2 add_subdirectory(OSDependent/Windows)
4 add_subdirectory(OSDependent/Unix)
6 message("unknown platform")
10 MachineIndependent/glslang.m4
11 MachineIndependent/glslang.y
12 MachineIndependent/glslang_tab.cpp
13 MachineIndependent/attribute.cpp
14 MachineIndependent/Constant.cpp
15 MachineIndependent/iomapper.cpp
16 MachineIndependent/InfoSink.cpp
17 MachineIndependent/Initialize.cpp
18 MachineIndependent/IntermTraverse.cpp
19 MachineIndependent/Intermediate.cpp
20 MachineIndependent/ParseContextBase.cpp
21 MachineIndependent/ParseHelper.cpp
22 MachineIndependent/PoolAlloc.cpp
23 MachineIndependent/RemoveTree.cpp
24 MachineIndependent/Scan.cpp
25 MachineIndependent/ShaderLang.cpp
26 MachineIndependent/SymbolTable.cpp
27 MachineIndependent/Versions.cpp
28 MachineIndependent/intermOut.cpp
29 MachineIndependent/limits.cpp
30 MachineIndependent/linkValidate.cpp
31 MachineIndependent/parseConst.cpp
32 MachineIndependent/reflection.cpp
33 MachineIndependent/preprocessor/Pp.cpp
34 MachineIndependent/preprocessor/PpAtom.cpp
35 MachineIndependent/preprocessor/PpContext.cpp
36 MachineIndependent/preprocessor/PpScanner.cpp
37 MachineIndependent/preprocessor/PpTokens.cpp
38 MachineIndependent/propagateNoContraction.cpp
39 GenericCodeGen/CodeGen.cpp
40 GenericCodeGen/Link.cpp)
47 Include/ConstantUnion.h
49 Include/InitializeGlobals.h
50 Include/intermediate.h
52 Include/ResourceLimits.h
56 MachineIndependent/attribute.h
57 MachineIndependent/glslang_tab.cpp.h
58 MachineIndependent/gl_types.h
59 MachineIndependent/Initialize.h
60 MachineIndependent/iomapper.h
61 MachineIndependent/LiveTraverser.h
62 MachineIndependent/localintermediate.h
63 MachineIndependent/ParseHelper.h
64 MachineIndependent/reflection.h
65 MachineIndependent/RemoveTree.h
66 MachineIndependent/Scan.h
67 MachineIndependent/ScanContext.h
68 MachineIndependent/SymbolTable.h
69 MachineIndependent/Versions.h
70 MachineIndependent/parseVersions.h
71 MachineIndependent/propagateNoContraction.h
72 MachineIndependent/preprocessor/PpContext.h
73 MachineIndependent/preprocessor/PpTokens.h)
75 glslang_pch(SOURCES MachineIndependent/pch.cpp)
77 add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
78 set_property(TARGET glslang PROPERTY FOLDER glslang)
79 set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
80 target_link_libraries(glslang OGLCompiler OSDependent)
81 target_include_directories(glslang PUBLIC ..)
83 if(WIN32 AND BUILD_SHARED_LIBS)
84 set_target_properties(glslang PROPERTIES PREFIX "")
88 target_link_libraries(glslang HLSL)
92 source_group("Public" REGULAR_EXPRESSION "Public/*")
93 source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")
94 source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")
95 source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")
96 source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
99 if(ENABLE_GLSLANG_INSTALL)
100 if(BUILD_SHARED_LIBS)
101 install(TARGETS glslang
102 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
103 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
104 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
106 install(TARGETS glslang
107 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
109 endif(ENABLE_GLSLANG_INSTALL)
111 if(ENABLE_GLSLANG_INSTALL)
112 foreach(file ${HEADERS})
113 get_filename_component(dir ${file} DIRECTORY)
114 install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir})
116 endif(ENABLE_GLSLANG_INSTALL)
118 if(ENABLE_GLSLANG_WEB)
119 add_executable(glslang.js glslang.js.cpp)
120 glslang_set_link_args(glslang.js)
121 target_link_libraries(glslang.js glslang SPIRV)
123 set_target_properties(glslang.js PROPERTIES
124 OUTPUT_NAME "glslang"
126 LINK_FLAGS "--bind -s EXPORT_NAME=\"glslangModule\"")
127 em_link_pre_js(glslang.js ${CMAKE_CURRENT_SOURCE_DIR}/glslang.pre.js)
129 endif(ENABLE_GLSLANG_WEB)