diff options
Diffstat (limited to 'modules/glslang/SCsub')
-rw-r--r-- | modules/glslang/SCsub | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/modules/glslang/SCsub b/modules/glslang/SCsub index c1d23a138b..182272ffc7 100644 --- a/modules/glslang/SCsub +++ b/modules/glslang/SCsub @@ -6,9 +6,13 @@ Import("env_modules") env_glslang = env_modules.Clone() # Thirdparty source files + +thirdparty_obj = [] + if env["builtin_glslang"]: thirdparty_dir = "#thirdparty/glslang/" thirdparty_sources = [ + "glslang/CInterface/glslang_c_interface.cpp", "glslang/MachineIndependent/RemoveTree.cpp", "glslang/MachineIndependent/ParseHelper.cpp", "glslang/MachineIndependent/iomapper.cpp", @@ -30,7 +34,6 @@ if env["builtin_glslang"]: "glslang/MachineIndependent/intermOut.cpp", "glslang/MachineIndependent/SymbolTable.cpp", "glslang/MachineIndependent/glslang_tab.cpp", - "glslang/MachineIndependent/pch.cpp", "glslang/MachineIndependent/Versions.cpp", "glslang/MachineIndependent/ShaderLang.cpp", "glslang/MachineIndependent/parseConst.cpp", @@ -40,6 +43,7 @@ if env["builtin_glslang"]: "glslang/GenericCodeGen/Link.cpp", "glslang/GenericCodeGen/CodeGen.cpp", "OGLCompilersDLL/InitializeDll.cpp", + "SPIRV/CInterface/spirv_c_interface.cpp", "SPIRV/InReadableOrder.cpp", "SPIRV/GlslangToSpv.cpp", "SPIRV/SpvBuilder.cpp", @@ -49,6 +53,7 @@ if env["builtin_glslang"]: "SPIRV/SPVRemapper.cpp", "SPIRV/SpvPostProcess.cpp", "SPIRV/Logger.cpp", + "StandAlone/ResourceLimits.cpp", ] if env["platform"] == "windows": @@ -64,9 +69,20 @@ if env["builtin_glslang"]: else: env_glslang.Prepend(CPPPATH=[thirdparty_dir]) + env_glslang.Append(CPPDEFINES=["ENABLE_OPT=0"]) + env_thirdparty = env_glslang.Clone() env_thirdparty.disable_warnings() - env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources) + env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources) + env.modules_sources += thirdparty_obj + + +# Godot source files + +module_obj = [] + +env_glslang.add_source_files(module_obj, "*.cpp") +env.modules_sources += module_obj -# Godot's own source files -env_glslang.add_source_files(env.modules_sources, "*.cpp") +# Needed to force rebuilding the module files when the thirdparty library is updated. +env.Depends(module_obj, thirdparty_obj) |