glslang/SPIRV/CMakeLists.txt

62 lines
1.4 KiB
CMake
Raw Normal View History

2015-06-26 22:58:36 +00:00
set(SOURCES
GlslangToSpv.cpp
2016-01-18 21:18:37 +00:00
InReadableOrder.cpp
Logger.cpp
2015-06-26 22:58:36 +00:00
SpvBuilder.cpp
doc.cpp
disassemble.cpp)
set(SPVREMAP_SOURCES
SPVRemapper.cpp
doc.cpp)
2015-06-26 22:58:36 +00:00
set(HEADERS
bitutils.h
2015-08-07 04:53:06 +00:00
spirv.hpp
GLSL.std.450.h
GLSL.ext.KHR.h
2015-06-26 22:58:36 +00:00
GlslangToSpv.h
hex_float.h
Logger.h
2015-06-26 22:58:36 +00:00
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)
2017-01-24 06:24:21 +00:00
list(APPEND
HEADERS
GLSL.ext.NV.h)
endif(ENABLE_NV_EXTENSIONS)
2015-06-26 22:58:36 +00:00
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)
2015-06-26 22:58:36 +00:00
add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
2015-06-26 22:58:36 +00:00
if(WIN32)
source_group("Source" FILES ${SOURCES} ${HEADERS})
source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
2015-06-26 22:58:36 +00:00
endif(WIN32)
2017-07-04 13:00:35 +00:00
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS SPIRV SPVRemapper
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
2017-07-04 13:00:35 +00:00
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
endif(ENABLE_GLSLANG_INSTALL)