|
@@ -32,73 +32,43 @@ 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 platform == "linux":
|
|
|
- env.Append(CCFLAGS = ['-g','-O3', '-std=c++14'])
|
|
|
-
|
|
|
-
|
|
|
- env.Append(CPPPATH=['include/core', godot_headers_path])
|
|
|
-
|
|
|
- if platform == "windows":
|
|
|
- env.Append(LIBS=[godot_name + '.lib'])
|
|
|
- env.Append(LIBPATH=[godot_lib_path])
|
|
|
-
|
|
|
- env.Append(CPPFLAGS=['-D_GD_CPP_CORE_API_IMPL'])
|
|
|
-
|
|
|
- sources = []
|
|
|
- add_sources(sources, "src/core")
|
|
|
-
|
|
|
- library = env.SharedLibrary(target='bin/godot_cpp_core', source=sources)
|
|
|
- Default(library)
|
|
|
+if platform == "linux":
|
|
|
+ env.Append(CCFLAGS = ['-g','-O3', '-std=c++14'])
|
|
|
|
|
|
+env.Append(CPPPATH=['.', godot_headers_path, 'include', 'include/core'])
|
|
|
|
|
|
-elif target == "bindings":
|
|
|
+if platform == "windows":
|
|
|
+ env.Append(LIBS=[godot_name])
|
|
|
+ env.Append(LIBPATH=[godot_lib_path])
|
|
|
|
|
|
- if ARGUMENTS.get("generate_bindings", "no") == "yes":
|
|
|
- godot_executable = godot_bin_path + godot_name
|
|
|
+sources = []
|
|
|
+add_sources(sources, "src/core")
|
|
|
|
|
|
- if env["CXX"] == "clang++":
|
|
|
- godot_executable += ".llvm"
|
|
|
|
|
|
- if platform == "windows":
|
|
|
- godot_executable += ".exe"
|
|
|
-
|
|
|
- # TODO Generating the API should be done only if the Godot build is more recent than the JSON file
|
|
|
- json_api_file = 'godot_api.json'
|
|
|
+if ARGUMENTS.get("generate_bindings", "no") == "yes":
|
|
|
+ godot_executable = godot_bin_path + godot_name
|
|
|
|
|
|
- subprocess.call([godot_executable, '--gdnative-generate-json-api', json_api_file])
|
|
|
+ if env["CXX"] == "clang++":
|
|
|
+ godot_executable += ".llvm"
|
|
|
|
|
|
- # actually create the bindings here
|
|
|
-
|
|
|
- import binding_generator
|
|
|
-
|
|
|
-
|
|
|
- binding_generator.generate_bindings(json_api_file)
|
|
|
-
|
|
|
-
|
|
|
- if platform == "linux":
|
|
|
- if env["CXX"] == "clang++":
|
|
|
- env.Append(CCFLAGS = ['-Wno-writable-strings'])
|
|
|
- else:
|
|
|
- env.Append(CCFLAGS = ['-Wno-write-strings', '-Wno-return-local-addr'])
|
|
|
-
|
|
|
- env.Append(CCFLAGS = ['-g','-O3', '-std=c++14'])
|
|
|
- env.Append(LINKFLAGS = ['-Wl,-R,\'$$ORIGIN\''])
|
|
|
+ if platform == "windows":
|
|
|
+ godot_executable += ".exe"
|
|
|
+
|
|
|
+ # TODO Generating the API should be done only if the Godot build is more recent than the JSON file
|
|
|
+ json_api_file = 'godot_api.json'
|
|
|
|
|
|
- env.Append(CPPPATH=['.', godot_headers_path, 'include', 'include/core'])
|
|
|
+ subprocess.call([godot_executable, '--gdnative-generate-json-api', json_api_file])
|
|
|
|
|
|
- if platform == "windows":
|
|
|
- env.Append(LIBS=[godot_name])
|
|
|
- env.Append(LIBPATH=[godot_lib_path])
|
|
|
+ # actually create the bindings here
|
|
|
+
|
|
|
+ import binding_generator
|
|
|
|
|
|
- env.Append(LIBS=['godot_cpp_core'])
|
|
|
- env.Append(LIBPATH=['bin'])
|
|
|
+
|
|
|
+ binding_generator.generate_bindings(json_api_file)
|
|
|
|
|
|
- env.Append(CPPFLAGS=['-D_GD_CPP_BINDING_IMPL'])
|
|
|
|
|
|
- sources = []
|
|
|
- add_sources(sources, "src")
|
|
|
+add_sources(sources, "src")
|
|
|
|
|
|
- library = env.SharedLibrary(target='bin/godot_cpp_bindings', source=sources)
|
|
|
- Default(library)
|
|
|
+library = env.StaticLibrary(target='bin/godot_cpp_bindings', source=sources)
|
|
|
+Default(library)
|
|
|
|