included godot_headers as submodule

pull/135/head
karroffel 2018-05-16 02:05:41 +02:00
parent fe38da6cb3
commit 684a06daf2
5 changed files with 140172 additions and 15 deletions

1
.gitignore vendored
View File

@ -2,7 +2,6 @@
src/*.cpp src/*.cpp
src/*.hpp src/*.hpp
include/*.hpp include/*.hpp
*.json
# Misc # Misc
logs/* logs/*

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "godot_headers"] [submodule "godot_headers"]
path = godot_headers path = godot_headers
url = ./godot_headers url = git@github.com:GodotNativeTools/godot_headers.git

View File

@ -1,12 +1,10 @@
GENERATE_BINDINGS = no
GODOT_BIN_PATH = ../godot_fork/bin/godot.x11.tools.64.llvm HEADERS = godot_headers
REGENERATE_BINDINGS = no
HEADERS = ../godot_headers
TARGET = debug TARGET = debug
NAME = godot-cpp NAME = godot-cpp
USE_CLANG = no USE_CLANG = no
BASE = scons n=$(NAME) use_llvm=$(USE_CLANG) regenerate_bindings=$(REGENERATE_BINDINGS) target=$(TARGET) headers=$(HEADERS) godotbinpath=$(GODOT_BIN_PATH) -j4 BASE = scons n=$(NAME) use_llvm=$(USE_CLANG) generate_bindings=$(GENERATE_BINDINGS) target=$(TARGET) headers=$(HEADERS) -j4
LINUX = $(BASE) p=linux LINUX = $(BASE) p=linux
WINDOWS = $(BASE) p=windows WINDOWS = $(BASE) p=windows
OSX = $(BASE) p=osx OSX = $(BASE) p=osx

View File

@ -16,8 +16,7 @@ target_arch = ARGUMENTS.get('a', ARGUMENTS.get('arch', '64'))
# default to debug build, must be same setting as used for cpp_bindings # default to debug build, must be same setting as used for cpp_bindings
target = ARGUMENTS.get('target', 'debug') target = ARGUMENTS.get('target', 'debug')
# Local dependency paths, adapt them to your setup # Local dependency paths, adapt them to your setup
godot_headers = ARGUMENTS.get('headers', '../godot_headers') godot_headers = ARGUMENTS.get('headers', 'godot_headers')
godot_bin_path = ARGUMENTS.get('godotbinpath', os.getenv('GODOT_BIN_PATH', '../godot_fork/bin/godot.x11.tools.64.llvm'))
result_path = 'bin' result_path = 'bin'
result_name = ARGUMENTS.get('n', ARGUMENTS.get('name', os.path.relpath('.', '..'))) result_name = ARGUMENTS.get('n', ARGUMENTS.get('name', os.path.relpath('.', '..')))
@ -25,7 +24,6 @@ result_name = ARGUMENTS.get('n', ARGUMENTS.get('name', os.path.relpath('.', '..'
if target_platform == 'linux': if target_platform == 'linux':
result_name += '.linux.' + target_arch result_name += '.linux.' + target_arch
env['CXX']='gcc-5'
if ARGUMENTS.get('use_llvm', 'no') == 'yes': if ARGUMENTS.get('use_llvm', 'no') == 'yes':
env['CXX'] = 'clang++' env['CXX'] = 'clang++'
@ -80,19 +78,21 @@ elif target_platform == 'osx':
env.Append(CPPPATH=['.', godot_headers, 'include', 'include/core']) env.Append(CPPPATH=['.', godot_headers, 'include', 'include/core'])
# Generate bindings?
json_api_file = ''
# Generate bindings if ARGUMENTS.get('use_custom_api_file', 'no') == 'yes':
json_api_file = ARGUMENTS.get('custom_api_file', '')
else:
json_api_file = os.path.join(os.getcwd(), 'godot_api.json') json_api_file = os.path.join(os.getcwd(), 'godot_api.json')
if os.path.exists(json_api_file) == False or ARGUMENTS.get('regenerate_bindings', 'no') == 'yes':
subprocess.call([os.path.expanduser(godot_bin_path), '--gdnative-generate-json-api', json_api_file])
if ARGUMENTS.get('generate_bindings', 'no') == 'yes':
# actually create the bindings here # actually create the bindings here
import binding_generator import binding_generator
binding_generator.generate_bindings(json_api_file) binding_generator.generate_bindings(json_api_file)
sources = [] sources = []
add_sources(sources, 'src/core', 'cpp') add_sources(sources, 'src/core', 'cpp')
add_sources(sources, 'src', 'cpp') add_sources(sources, 'src', 'cpp')

140160
godot_api.json Normal file

File diff suppressed because it is too large Load Diff