mirror of
https://github.com/godotengine/godot-git-plugin.git
synced 2026-01-03 10:09:43 +03:00
Fix building through scons on Windows
This commit is contained in:
@@ -12,7 +12,7 @@ opts.Add(EnumVariable('platform', "Compilation platform", '', ['', 'windows', 'x
|
||||
opts.Add(EnumVariable('p', "Compilation target, alias for 'platform'", '', ['', 'windows', 'x11', 'linux', 'osx']))
|
||||
opts.Add(BoolVariable('use_llvm', "Use the LLVM / Clang compiler", 'no'))
|
||||
opts.Add(PathVariable('target_path', 'The path where the lib is installed.', 'demo/bin/'))
|
||||
opts.Add(PathVariable('target_name', 'The library name.', 'libgitapi', PathVariable.PathAccept))
|
||||
opts.Add(PathVariable('target_name', 'The library name.', 'libgdexample', PathVariable.PathAccept))
|
||||
|
||||
# Local dependency paths, adapt them to your setup
|
||||
godot_headers_path = "godot-cpp/godot_headers/"
|
||||
@@ -63,7 +63,7 @@ elif env['platform'] == "windows":
|
||||
# that way you can run scons in a vs 2017 prompt and it will find all the required tools
|
||||
env.Append(ENV = os.environ)
|
||||
|
||||
env.Append(CCFLAGS = ['-D_WIN64', '-D_WINDOWS', '-W3', '-GR', '-D_CRT_SECURE_NO_WARNINGS'])
|
||||
env.Append(CCFLAGS = ['-DWIN32', '-D_WIN32', '-D_WINDOWS', '-W3', '-GR', '-D_CRT_SECURE_NO_WARNINGS'])
|
||||
if env['target'] in ('debug', 'd'):
|
||||
env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '-MDd'])
|
||||
else:
|
||||
@@ -82,8 +82,8 @@ env.Append(LIBPATH=[cpp_bindings_path + 'bin/'])
|
||||
env.Append(LIBS=[cpp_library])
|
||||
|
||||
# tweak this if you want to use different folders, or more folders, to store your source code in.
|
||||
env.Append(CPPPATH=['src/'])
|
||||
sources = Glob('src/*.cpp')
|
||||
env.Append(CPPPATH=['godot-git-plugin/src/'])
|
||||
sources = Glob('godot-git-plugin/src/*.cpp')
|
||||
|
||||
library = env.SharedLibrary(target=env['target_path'] + env['target_name'] , source=sources)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user