2 add_subdirectory(OSDependent/Windows)
4 add_subdirectory(OSDependent/Unix)
6 message("unknown platform")
10 MachineIndependent/glslang.y
11 MachineIndependent/glslang_tab.cpp
12 MachineIndependent/attribute.cpp
13 MachineIndependent/Constant.cpp
14 MachineIndependent/iomapper.cpp
15 MachineIndependent/InfoSink.cpp
16 MachineIndependent/Initialize.cpp
17 MachineIndependent/IntermTraverse.cpp
18 MachineIndependent/Intermediate.cpp
19 MachineIndependent/ParseContextBase.cpp
20 MachineIndependent/ParseHelper.cpp
21 MachineIndependent/PoolAlloc.cpp
22 MachineIndependent/RemoveTree.cpp
23 MachineIndependent/Scan.cpp
24 MachineIndependent/ShaderLang.cpp
25 MachineIndependent/SymbolTable.cpp
26 MachineIndependent/Versions.cpp
27 MachineIndependent/intermOut.cpp
28 MachineIndependent/limits.cpp
29 MachineIndependent/linkValidate.cpp
30 MachineIndependent/parseConst.cpp
31 MachineIndependent/reflection.cpp
32 MachineIndependent/preprocessor/Pp.cpp
33 MachineIndependent/preprocessor/PpAtom.cpp
34 MachineIndependent/preprocessor/PpContext.cpp
35 MachineIndependent/preprocessor/PpScanner.cpp
36 MachineIndependent/preprocessor/PpTokens.cpp
37 MachineIndependent/propagateNoContraction.cpp
38 GenericCodeGen/CodeGen.cpp
39 GenericCodeGen/Link.cpp)
46 Include/ConstantUnion.h
48 Include/InitializeGlobals.h
49 Include/intermediate.h
51 Include/ResourceLimits.h
55 MachineIndependent/attribute.h
56 MachineIndependent/glslang_tab.cpp.h
57 MachineIndependent/gl_types.h
58 MachineIndependent/Initialize.h
59 MachineIndependent/iomapper.h
60 MachineIndependent/LiveTraverser.h
61 MachineIndependent/localintermediate.h
62 MachineIndependent/ParseHelper.h
63 MachineIndependent/reflection.h
64 MachineIndependent/RemoveTree.h
65 MachineIndependent/Scan.h
66 MachineIndependent/ScanContext.h
67 MachineIndependent/SymbolTable.h
68 MachineIndependent/Versions.h
69 MachineIndependent/parseVersions.h
70 MachineIndependent/propagateNoContraction.h
71 MachineIndependent/preprocessor/PpContext.h
72 MachineIndependent/preprocessor/PpTokens.h)
74 # This might be useful for making grammar changes:
77 # add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h
78 # COMMAND ${BISON_EXECUTABLE} --defines=${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp.h -t ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang.y -o ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp
79 # MAIN_DEPENDENCY MachineIndependent/glslang.y
80 # WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
81 # set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp)
83 glslang_pch(SOURCES MachineIndependent/pch.cpp)
85 add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
86 set_property(TARGET glslang PROPERTY FOLDER glslang)
87 set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
88 target_link_libraries(glslang OGLCompiler OSDependent)
89 target_include_directories(glslang PUBLIC ..)
91 if(WIN32 AND BUILD_SHARED_LIBS)
92 set_target_properties(glslang PROPERTIES PREFIX "")
96 target_link_libraries(glslang HLSL)
100 source_group("Public" REGULAR_EXPRESSION "Public/*")
101 source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")
102 source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")
103 source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")
104 source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
107 if(ENABLE_GLSLANG_INSTALL)
108 if(BUILD_SHARED_LIBS)
109 install(TARGETS glslang
110 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
111 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
113 install(TARGETS glslang
114 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
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)