mirror of
https://github.com/RPCS3/glslang.git
synced 2024-12-28 06:06:28 +00:00
17b5f9175d
Add option to skip installation
62 lines
1.4 KiB
CMake
Executable File
62 lines
1.4 KiB
CMake
Executable File
set(SOURCES
|
|
GlslangToSpv.cpp
|
|
InReadableOrder.cpp
|
|
Logger.cpp
|
|
SpvBuilder.cpp
|
|
doc.cpp
|
|
disassemble.cpp)
|
|
|
|
set(SPVREMAP_SOURCES
|
|
SPVRemapper.cpp
|
|
doc.cpp)
|
|
|
|
set(HEADERS
|
|
bitutils.h
|
|
spirv.hpp
|
|
GLSL.std.450.h
|
|
GLSL.ext.KHR.h
|
|
GlslangToSpv.h
|
|
hex_float.h
|
|
Logger.h
|
|
SpvBuilder.h
|
|
spvIR.h
|
|
doc.h
|
|
disassemble.h)
|
|
|
|
set(SPVREMAP_HEADERS
|
|
SPVRemapper.h
|
|
doc.h)
|
|
|
|
if(ENABLE_AMD_EXTENSIONS)
|
|
list(APPEND
|
|
HEADERS
|
|
GLSL.ext.AMD.h)
|
|
endif(ENABLE_AMD_EXTENSIONS)
|
|
|
|
if(ENABLE_NV_EXTENSIONS)
|
|
list(APPEND
|
|
HEADERS
|
|
GLSL.ext.NV.h)
|
|
endif(ENABLE_NV_EXTENSIONS)
|
|
|
|
add_library(SPIRV STATIC ${SOURCES} ${HEADERS})
|
|
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
|
|
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
target_link_libraries(SPIRV glslang)
|
|
|
|
add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
|
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
|
|
set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
|
|
if(WIN32)
|
|
source_group("Source" FILES ${SOURCES} ${HEADERS})
|
|
source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
|
|
endif(WIN32)
|
|
|
|
if(ENABLE_GLSLANG_INSTALL)
|
|
install(TARGETS SPIRV SPVRemapper
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
|
|
endif(ENABLE_GLSLANG_INSTALL)
|