2 add_subdirectory(OSDependent/Windows)
4 add_subdirectory(OSDependent/Unix)
6 message("unknown platform")
9 if(EMSCRIPTEN OR ENABLE_GLSLANG_WEB)
10 add_subdirectory(OSDependent/Web)
11 endif(EMSCRIPTEN OR ENABLE_GLSLANG_WEB)
14 MachineIndependent/glslang.m4
15 MachineIndependent/glslang.y
16 MachineIndependent/glslang_tab.cpp
17 MachineIndependent/attribute.cpp
18 MachineIndependent/Constant.cpp
19 MachineIndependent/iomapper.cpp
20 MachineIndependent/InfoSink.cpp
21 MachineIndependent/Initialize.cpp
22 MachineIndependent/IntermTraverse.cpp
23 MachineIndependent/Intermediate.cpp
24 MachineIndependent/ParseContextBase.cpp
25 MachineIndependent/ParseHelper.cpp
26 MachineIndependent/PoolAlloc.cpp
27 MachineIndependent/RemoveTree.cpp
28 MachineIndependent/Scan.cpp
29 MachineIndependent/ShaderLang.cpp
30 MachineIndependent/SymbolTable.cpp
31 MachineIndependent/Versions.cpp
32 MachineIndependent/intermOut.cpp
33 MachineIndependent/limits.cpp
34 MachineIndependent/linkValidate.cpp
35 MachineIndependent/parseConst.cpp
36 MachineIndependent/reflection.cpp
37 MachineIndependent/preprocessor/Pp.cpp
38 MachineIndependent/preprocessor/PpAtom.cpp
39 MachineIndependent/preprocessor/PpContext.cpp
40 MachineIndependent/preprocessor/PpScanner.cpp
41 MachineIndependent/preprocessor/PpTokens.cpp
42 MachineIndependent/propagateNoContraction.cpp
43 GenericCodeGen/CodeGen.cpp
44 GenericCodeGen/Link.cpp)
51 Include/ConstantUnion.h
53 Include/InitializeGlobals.h
54 Include/intermediate.h
56 Include/ResourceLimits.h
60 MachineIndependent/attribute.h
61 MachineIndependent/glslang_tab.cpp.h
62 MachineIndependent/gl_types.h
63 MachineIndependent/Initialize.h
64 MachineIndependent/iomapper.h
65 MachineIndependent/LiveTraverser.h
66 MachineIndependent/localintermediate.h
67 MachineIndependent/ParseHelper.h
68 MachineIndependent/reflection.h
69 MachineIndependent/RemoveTree.h
70 MachineIndependent/Scan.h
71 MachineIndependent/ScanContext.h
72 MachineIndependent/SymbolTable.h
73 MachineIndependent/Versions.h
74 MachineIndependent/parseVersions.h
75 MachineIndependent/propagateNoContraction.h
76 MachineIndependent/preprocessor/PpContext.h
77 MachineIndependent/preprocessor/PpTokens.h)
79 glslang_pch(SOURCES MachineIndependent/pch.cpp)
81 add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
82 set_property(TARGET glslang PROPERTY FOLDER glslang)
83 set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
84 target_link_libraries(glslang OGLCompiler OSDependent)
85 target_include_directories(glslang PUBLIC ..)
87 if(WIN32 AND BUILD_SHARED_LIBS)
88 set_target_properties(glslang PROPERTIES PREFIX "")
92 target_link_libraries(glslang HLSL)
96 source_group("Public" REGULAR_EXPRESSION "Public/*")
97 source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")
98 source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")
99 source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")
100 source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
103 if(ENABLE_GLSLANG_INSTALL)
104 if(BUILD_SHARED_LIBS)
105 install(TARGETS glslang
106 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
107 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
108 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
110 install(TARGETS glslang
111 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
113 endif(ENABLE_GLSLANG_INSTALL)
115 if(ENABLE_GLSLANG_INSTALL)
116 foreach(file ${HEADERS})
117 get_filename_component(dir ${file} DIRECTORY)
118 install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir})
120 endif(ENABLE_GLSLANG_INSTALL)