Debian Codegraph @

modules/glslang/SCsub

raw symbols SCIP
1 #!/usr/bin/env python
2 from misc.utility.scons_hints import *
3
4 Import("env")
5 Import("env_modules")
6
7 env_glslang = env_modules.Clone()
8
9 # Thirdparty source files
10
11 thirdparty_obj = []
12
13 if env["builtin_glslang"]:
14 thirdparty_dir = "#thirdparty/glslang/"
15 thirdparty_spirv_headers_dir = "#thirdparty/spirv-headers/"
16 thirdparty_sources = [
17 "glslang/GenericCodeGen/CodeGen.cpp",
18 "glslang/GenericCodeGen/Link.cpp",
19 "glslang/MachineIndependent/attribute.cpp",
20 "glslang/MachineIndependent/Constant.cpp",
21 "glslang/MachineIndependent/glslang_tab.cpp",
22 "glslang/MachineIndependent/InfoSink.cpp",
23 "glslang/MachineIndependent/Initialize.cpp",
24 "glslang/MachineIndependent/Intermediate.cpp",
25 "glslang/MachineIndependent/intermOut.cpp",
26 "glslang/MachineIndependent/IntermTraverse.cpp",
27 "glslang/MachineIndependent/iomapper.cpp",
28 "glslang/MachineIndependent/limits.cpp",
29 "glslang/MachineIndependent/linkValidate.cpp",
30 "glslang/MachineIndependent/parseConst.cpp",
31 "glslang/MachineIndependent/ParseContextBase.cpp",
32 "glslang/MachineIndependent/ParseHelper.cpp",
33 "glslang/MachineIndependent/PoolAlloc.cpp",
34 "glslang/MachineIndependent/preprocessor/PpAtom.cpp",
35 "glslang/MachineIndependent/preprocessor/PpContext.cpp",
36 "glslang/MachineIndependent/preprocessor/Pp.cpp",
37 "glslang/MachineIndependent/preprocessor/PpScanner.cpp",
38 "glslang/MachineIndependent/preprocessor/PpTokens.cpp",
39 "glslang/MachineIndependent/propagateNoContraction.cpp",
40 "glslang/MachineIndependent/reflection.cpp",
41 "glslang/MachineIndependent/RemoveTree.cpp",
42 "glslang/MachineIndependent/Scan.cpp",
43 "glslang/MachineIndependent/ShaderLang.cpp",
44 "glslang/MachineIndependent/SpirvIntrinsics.cpp",
45 "glslang/MachineIndependent/SymbolTable.cpp",
46 "glslang/MachineIndependent/Versions.cpp",
47 "glslang/ResourceLimits/ResourceLimits.cpp",
48 "SPIRV/disassemble.cpp",
49 "SPIRV/doc.cpp",
50 "SPIRV/GlslangToSpv.cpp",
51 "SPIRV/InReadableOrder.cpp",
52 "SPIRV/Logger.cpp",
53 "SPIRV/SpvBuilder.cpp",
54 "SPIRV/SpvPostProcess.cpp",
55 "SPIRV/SPVRemapper.cpp",
56 "SPIRV/SpvTools.cpp",
57 ]
58
59 if env["platform"] == "windows":
60 thirdparty_sources.append("glslang/OSDependent/Windows/ossource.cpp")
61 else:
62 thirdparty_sources.append("glslang/OSDependent/Unix/ossource.cpp")
63
64 thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
65
66 env_glslang.Prepend(CPPPATH=[thirdparty_dir, "#thirdparty"])
67 env_glslang.Prepend(CPPPATH=[thirdparty_spirv_headers_dir + "include/spirv/unified1"])
68
69 env_glslang.Append(CPPDEFINES=[("ENABLE_OPT", 0)])
70
71 env_thirdparty = env_glslang.Clone()
72 env_thirdparty.disable_warnings()
73 env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
74 env.modules_sources += thirdparty_obj
75
76
77 # Godot source files
78
79 module_obj = []
80
81 env_glslang.add_source_files(module_obj, "*.cpp")
82 env.modules_sources += module_obj
83
84 # Needed to force rebuilding the module files when the thirdparty library is updated.
85 env.Depends(module_obj, thirdparty_obj)