mirror of
https://github.com/godotengine/gdnative-demos.git
synced 2026-01-03 14:09:44 +03:00
Commit files changed by black_format.sh
This commit is contained in:
@@ -9,7 +9,7 @@ platform = ARGUMENTS.get("platform", platform)
|
||||
# that way you can run scons in a vs 2017 prompt and it will find all the required tools
|
||||
env = Environment()
|
||||
if platform == "windows":
|
||||
env = Environment(ENV = os.environ)
|
||||
env = Environment(ENV=os.environ)
|
||||
|
||||
godot_headers_path = ARGUMENTS.get("headers", os.getenv("GODOT_HEADERS", "godot-cpp/godot_headers"))
|
||||
godot_bindings_path = ARGUMENTS.get("cpp_bindings", os.getenv("CPP_BINDINGS", "godot-cpp"))
|
||||
@@ -23,36 +23,44 @@ if ARGUMENTS.get("use_llvm", "no") == "yes":
|
||||
|
||||
# put stuff that is the same for all first, saves duplication
|
||||
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'])
|
||||
env.Append(CCFLAGS=["-g", "-O3", "-std=c++14", "-arch", "x86_64"])
|
||||
env.Append(LINKFLAGS=["-arch", "x86_64", "-framework", "Cocoa", "-Wl,-undefined,dynamic_lookup"])
|
||||
elif platform == "linux":
|
||||
env.Append(CCFLAGS = ['-g','-O3', '-std=c++14', '-Wno-writable-strings'])
|
||||
env.Append(LINKFLAGS = ['-Wl,-R,\'$$ORIGIN\''])
|
||||
env.Append(CCFLAGS=["-g", "-O3", "-std=c++14", "-Wno-writable-strings"])
|
||||
env.Append(LINKFLAGS=["-Wl,-R,'$$ORIGIN'"])
|
||||
elif platform == "windows":
|
||||
# need to add detection of msvc vs mingw, this is for msvc...
|
||||
env.Append(LINKFLAGS = ['/WX'])
|
||||
env.Append(LINKFLAGS=["/WX"])
|
||||
if target == "debug":
|
||||
env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '/MDd'])
|
||||
env.Append(CCFLAGS=["-EHsc", "-D_DEBUG", "/MDd"])
|
||||
else:
|
||||
env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '/MD'])
|
||||
env.Append(CCFLAGS=["-O2", "-EHsc", "-DNDEBUG", "/MD"])
|
||||
|
||||
|
||||
def add_sources(sources, dir):
|
||||
for f in os.listdir(dir):
|
||||
if f.endswith(".cpp"):
|
||||
sources.append(dir + "/" + f)
|
||||
|
||||
env.Append(CPPPATH=[godot_headers_path, godot_bindings_path + '/include', godot_bindings_path + '/include/gen/', godot_bindings_path + '/include/core/'])
|
||||
|
||||
env.Append(
|
||||
CPPPATH=[
|
||||
godot_headers_path,
|
||||
godot_bindings_path + "/include",
|
||||
godot_bindings_path + "/include/gen/",
|
||||
godot_bindings_path + "/include/core/",
|
||||
]
|
||||
)
|
||||
|
||||
if target == "debug":
|
||||
env.Append(LIBS=['libgodot-cpp.linux.debug.64'])
|
||||
env.Append(LIBS=["libgodot-cpp.linux.debug.64"])
|
||||
else:
|
||||
env.Append(LIBS=['libgodot-cpp.linux.release.64'])
|
||||
env.Append(LIBS=["libgodot-cpp.linux.release.64"])
|
||||
|
||||
env.Append(LIBPATH=[ godot_bindings_path + '/bin/' ])
|
||||
env.Append(LIBPATH=[godot_bindings_path + "/bin/"])
|
||||
|
||||
sources = []
|
||||
add_sources(sources, "src")
|
||||
|
||||
library = env.SharedLibrary(target='bin/libsimple', source=sources)
|
||||
library = env.SharedLibrary(target="bin/libsimple", source=sources)
|
||||
Default(library)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ platform = ARGUMENTS.get("platform", platform)
|
||||
# that way you can run scons in a vs 2017 prompt and it will find all the required tools
|
||||
env = Environment()
|
||||
if platform == "windows":
|
||||
env = Environment(ENV = os.environ)
|
||||
env = Environment(ENV=os.environ)
|
||||
|
||||
godot_headers_path = ARGUMENTS.get("headers", os.getenv("GODOT_HEADERS", "godot-cpp/godot_headers"))
|
||||
godot_bindings_path = ARGUMENTS.get("cpp_bindings", os.getenv("CPP_BINDINGS", "godot-cpp"))
|
||||
@@ -23,35 +23,43 @@ if ARGUMENTS.get("use_llvm", "no") == "yes":
|
||||
|
||||
# put stuff that is the same for all first, saves duplication
|
||||
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'])
|
||||
env.Append(CCFLAGS=["-g", "-O3", "-std=c++14", "-arch", "x86_64"])
|
||||
env.Append(LINKFLAGS=["-arch", "x86_64", "-framework", "Cocoa", "-Wl,-undefined,dynamic_lookup"])
|
||||
elif platform == "linux":
|
||||
env.Append(CCFLAGS = ['-g','-O3', '-std=c++14', '-Wno-writable-strings'])
|
||||
env.Append(LINKFLAGS = ['-Wl,-R,\'$$ORIGIN\''])
|
||||
env.Append(CCFLAGS=["-g", "-O3", "-std=c++14", "-Wno-writable-strings"])
|
||||
env.Append(LINKFLAGS=["-Wl,-R,'$$ORIGIN'"])
|
||||
elif platform == "windows":
|
||||
# need to add detection of msvc vs mingw, this is for msvc...
|
||||
env.Append(LINKFLAGS = ['/WX'])
|
||||
env.Append(LINKFLAGS=["/WX"])
|
||||
if target == "debug":
|
||||
env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '/MDd'])
|
||||
env.Append(CCFLAGS=["-EHsc", "-D_DEBUG", "/MDd"])
|
||||
else:
|
||||
env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '/MD'])
|
||||
env.Append(CCFLAGS=["-O2", "-EHsc", "-DNDEBUG", "/MD"])
|
||||
|
||||
|
||||
def add_sources(sources, dir):
|
||||
for f in os.listdir(dir):
|
||||
if f.endswith(".cpp"):
|
||||
sources.append(dir + "/" + f)
|
||||
|
||||
env.Append(CPPPATH=[godot_headers_path, godot_bindings_path + '/include', godot_bindings_path + '/include/gen/', godot_bindings_path + '/include/core/'])
|
||||
|
||||
env.Append(
|
||||
CPPPATH=[
|
||||
godot_headers_path,
|
||||
godot_bindings_path + "/include",
|
||||
godot_bindings_path + "/include/gen/",
|
||||
godot_bindings_path + "/include/core/",
|
||||
]
|
||||
)
|
||||
|
||||
if target == "debug":
|
||||
env.Append(LIBS=['libgodot-cpp.linux.debug.64'])
|
||||
env.Append(LIBS=["libgodot-cpp.linux.debug.64"])
|
||||
else:
|
||||
env.Append(LIBS=['libgodot-cpp.linux.release.64'])
|
||||
env.Append(LIBPATH=[ godot_bindings_path + '/bin/' ])
|
||||
env.Append(LIBS=["libgodot-cpp.linux.release.64"])
|
||||
env.Append(LIBPATH=[godot_bindings_path + "/bin/"])
|
||||
|
||||
sources = []
|
||||
add_sources(sources, "src")
|
||||
|
||||
library = env.SharedLibrary(target='bin/libconstructor', source=sources)
|
||||
library = env.SharedLibrary(target="bin/libconstructor", source=sources)
|
||||
Default(library)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ platform = ARGUMENTS.get("platform", platform)
|
||||
# that way you can run scons in a vs 2017 prompt and it will find all the required tools
|
||||
env = Environment()
|
||||
if platform == "windows":
|
||||
env = Environment(ENV = os.environ)
|
||||
env = Environment(ENV=os.environ)
|
||||
|
||||
godot_headers_path = ARGUMENTS.get("headers", os.getenv("GODOT_HEADERS", "godot-cpp/godot_headers"))
|
||||
godot_bindings_path = ARGUMENTS.get("cpp_bindings", os.getenv("CPP_BINDINGS", "godot-cpp"))
|
||||
@@ -23,35 +23,43 @@ if ARGUMENTS.get("use_llvm", "no") == "yes":
|
||||
|
||||
# put stuff that is the same for all first, saves duplication
|
||||
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'])
|
||||
env.Append(CCFLAGS=["-g", "-O3", "-std=c++14", "-arch", "x86_64"])
|
||||
env.Append(LINKFLAGS=["-arch", "x86_64", "-framework", "Cocoa", "-Wl,-undefined,dynamic_lookup"])
|
||||
elif platform == "linux":
|
||||
env.Append(CCFLAGS = ['-g','-O3', '-std=c++14', '-Wno-writable-strings'])
|
||||
env.Append(LINKFLAGS = ['-Wl,-R,\'$$ORIGIN\''])
|
||||
env.Append(CCFLAGS=["-g", "-O3", "-std=c++14", "-Wno-writable-strings"])
|
||||
env.Append(LINKFLAGS=["-Wl,-R,'$$ORIGIN'"])
|
||||
elif platform == "windows":
|
||||
# need to add detection of msvc vs mingw, this is for msvc...
|
||||
env.Append(LINKFLAGS = ['/WX'])
|
||||
env.Append(LINKFLAGS=["/WX"])
|
||||
if target == "debug":
|
||||
env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '/MDd'])
|
||||
env.Append(CCFLAGS=["-EHsc", "-D_DEBUG", "/MDd"])
|
||||
else:
|
||||
env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '/MD'])
|
||||
env.Append(CCFLAGS=["-O2", "-EHsc", "-DNDEBUG", "/MD"])
|
||||
|
||||
|
||||
def add_sources(sources, dir):
|
||||
for f in os.listdir(dir):
|
||||
if f.endswith(".cpp"):
|
||||
sources.append(dir + "/" + f)
|
||||
|
||||
env.Append(CPPPATH=[godot_headers_path, godot_bindings_path + '/include/gen/', godot_bindings_path + '/include/core/', godot_bindings_path + '/include/'])
|
||||
|
||||
env.Append(
|
||||
CPPPATH=[
|
||||
godot_headers_path,
|
||||
godot_bindings_path + "/include/gen/",
|
||||
godot_bindings_path + "/include/core/",
|
||||
godot_bindings_path + "/include/",
|
||||
]
|
||||
)
|
||||
|
||||
if target == "debug":
|
||||
env.Append(LIBS=['libgodot-cpp.linux.debug.64'])
|
||||
env.Append(LIBS=["libgodot-cpp.linux.debug.64"])
|
||||
else:
|
||||
env.Append(LIBS=['libgodot-cpp.linux.release.64'])
|
||||
env.Append(LIBPATH=[ godot_bindings_path + '/bin/' ])
|
||||
env.Append(LIBS=["libgodot-cpp.linux.release.64"])
|
||||
env.Append(LIBPATH=[godot_bindings_path + "/bin/"])
|
||||
|
||||
sources = []
|
||||
add_sources(sources, "src")
|
||||
|
||||
library = env.SharedLibrary(target='bin/libkinematic_char', source=sources)
|
||||
library = env.SharedLibrary(target="bin/libkinematic_char", source=sources)
|
||||
Default(library)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user