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
86 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
87 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
89 if(WIN32 AND BUILD_SHARED_LIBS)
90 set_target_properties(glslang PROPERTIES PREFIX "")
94 target_link_libraries(glslang HLSL)
98 source_group("Public" REGULAR_EXPRESSION "Public/*")
99 source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")
100 source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")
101 source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")
102 source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
105 if(ENABLE_GLSLANG_INSTALL)
106 if(BUILD_SHARED_LIBS)
107 install(TARGETS glslang EXPORT glslangTargets
108 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
109 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
110 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
112 install(TARGETS glslang EXPORT glslangTargets
113 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
115 install(EXPORT glslangTargets DESTINATION lib/cmake)
116 endif(ENABLE_GLSLANG_INSTALL)
118 if(ENABLE_GLSLANG_INSTALL)
119 foreach(file ${HEADERS})
120 get_filename_component(dir ${file} DIRECTORY)
121 install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir})
123 endif(ENABLE_GLSLANG_INSTALL)