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 add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
84 set_property(TARGET glslang PROPERTY FOLDER glslang)
85 set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
86 target_link_libraries(glslang OGLCompiler OSDependent)
88 if(WIN32 AND BUILD_SHARED_LIBS)
89 set_target_properties(glslang PROPERTIES PREFIX "")
93 target_link_libraries(glslang HLSL)
97 source_group("Public" REGULAR_EXPRESSION "Public/*")
98 source_group("MachineIndependent" REGULAR_EXPRESSION "MachineIndependent/[^/]*")
99 source_group("Include" REGULAR_EXPRESSION "Include/[^/]*")
100 source_group("GenericCodeGen" REGULAR_EXPRESSION "GenericCodeGen/*")
101 source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
104 if(ENABLE_GLSLANG_INSTALL)
105 if(BUILD_SHARED_LIBS)
106 install(TARGETS glslang
107 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
108 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
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)