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
45 CInterface/glslang_c_interface.cpp)
52 Include/ConstantUnion.h
53 Include/glslang_c_interface.h
54 Include/glslang_c_shader_types.h
56 Include/InitializeGlobals.h
57 Include/intermediate.h
59 Include/ResourceLimits.h
63 MachineIndependent/attribute.h
64 MachineIndependent/glslang_tab.cpp.h
65 MachineIndependent/gl_types.h
66 MachineIndependent/Initialize.h
67 MachineIndependent/iomapper.h
68 MachineIndependent/LiveTraverser.h
69 MachineIndependent/localintermediate.h
70 MachineIndependent/ParseHelper.h
71 MachineIndependent/reflection.h
72 MachineIndependent/RemoveTree.h
73 MachineIndependent/Scan.h
74 MachineIndependent/ScanContext.h
75 MachineIndependent/SymbolTable.h
76 MachineIndependent/Versions.h
77 MachineIndependent/parseVersions.h
78 MachineIndependent/propagateNoContraction.h
79 MachineIndependent/preprocessor/PpContext.h
80 MachineIndependent/preprocessor/PpTokens.h)
82 glslang_pch(SOURCES MachineIndependent/pch.cpp)
84 add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
85 set_property(TARGET glslang PROPERTY FOLDER glslang)
86 set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
87 target_link_libraries(glslang OGLCompiler OSDependent)
88 target_include_directories(glslang PUBLIC
89 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
90 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
92 if(WIN32 AND BUILD_SHARED_LIBS)
93 set_target_properties(glslang PROPERTIES PREFIX "")
97 target_link_libraries(glslang HLSL)
101 source_group("Public" REGULAR_EXPRESSION "Public/*")
102 source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")
103 source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")
104 source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")
105 source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
108 if(ENABLE_GLSLANG_INSTALL)
109 if(BUILD_SHARED_LIBS)
110 install(TARGETS glslang EXPORT glslangTargets
111 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
112 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
113 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
115 install(TARGETS glslang EXPORT glslangTargets
116 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
118 install(EXPORT glslangTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
119 endif(ENABLE_GLSLANG_INSTALL)
121 if(ENABLE_GLSLANG_INSTALL)
122 foreach(file ${HEADERS})
123 get_filename_component(dir ${file} DIRECTORY)
124 install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir})
126 endif(ENABLE_GLSLANG_INSTALL)