浏览代码

Getting this to compile on mac os x

BastiaanOlij 8 年之前
父节点
当前提交
1f36c2307a
共有 3 个文件被更改,包括 13 次插入0 次删除
  1. 6 0
      .gitattributes
  2. 1 0
      .gitignore
  3. 6 0
      SConstruct

+ 6 - 0
.gitattributes

@@ -0,0 +1,6 @@
+*.c eol=lf
+*.cpp eol=lf
+*.gd eol=lf
+*.tscn eol=lf
+*.cfg eol=lf
+*.godot eol=lf

+ 1 - 0
.gitignore

@@ -6,4 +6,5 @@ include/*.hpp
 *.obj
 *.obj
 *.pyc
 *.pyc
 *.json
 *.json
+*.dblite
 bin
 bin

+ 6 - 0
SConstruct

@@ -28,10 +28,15 @@ def add_sources(sources, directory):
             sources.append(directory + '/' + file)
             sources.append(directory + '/' + file)
 
 
 
 
+if platform == "osx":
+    env.Append(CCFLAGS = ['-g','-O3', '-std=c++14', '-arch', 'x86_64'])
+    env.Append(LINKFLAGS = ['-arch', 'x86_64', '-framework', 'Cocoa', '-Wl,-undefined,dynamic_lookup'])
+
 if target == "core":
 if target == "core":
     if platform == "linux":
     if platform == "linux":
         env.Append(CCFLAGS = ['-g','-O3', '-std=c++14'])
         env.Append(CCFLAGS = ['-g','-O3', '-std=c++14'])
     
     
+
     env.Append(CPPPATH=['include/core', godot_headers_path])
     env.Append(CPPPATH=['include/core', godot_headers_path])
 
 
     if platform == "windows":
     if platform == "windows":
@@ -79,6 +84,7 @@ elif target == "bindings":
         
         
         env.Append(CCFLAGS = ['-g','-O3', '-std=c++14'])
         env.Append(CCFLAGS = ['-g','-O3', '-std=c++14'])
         env.Append(LINKFLAGS = ['-Wl,-R,\'$$ORIGIN\''])
         env.Append(LINKFLAGS = ['-Wl,-R,\'$$ORIGIN\''])
+
     env.Append(CPPPATH=['.', godot_headers_path, 'include', 'include/core'])
     env.Append(CPPPATH=['.', godot_headers_path, 'include', 'include/core'])
 
 
     if platform == "windows":
     if platform == "windows":