aboutsummaryrefslogtreecommitdiff
path: root/SPIRV
diff options
context:
space:
mode:
authorJames Rumble <james.rumble@imgtec.com>2019-08-06 14:47:51 +0100
committerJames Rumble <james.rumble@imgtec.com>2019-08-06 14:47:51 +0100
commitab6d1499e14166bd853ad29f85ad536b516760a6 (patch)
treef0bfa685f4086500a691e5331b6682b000559350 /SPIRV
parent3cea2e5882e3455731a8b6657fb06db913eb3aa1 (diff)
downloadglslang-ab6d1499e14166bd853ad29f85ad536b516760a6.tar.gz
Export glslang targets on installation
This allows the targets to be used in other cmake projects. See the following for more details: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages https://foonathan.net/blog/2016/07/07/cmake-dependency-handling.html
Diffstat (limited to 'SPIRV')
-rw-r--r--SPIRV/CMakeLists.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
index 594ab1ef..3ddf6f17 100644
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -80,22 +80,25 @@ endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
if(BUILD_SHARED_LIBS)
if (ENABLE_SPVREMAPPER)
- install(TARGETS SPVRemapper
+ install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
- install(TARGETS SPIRV
+ install(TARGETS SPIRV EXPORT SPIRVTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
else()
if (ENABLE_SPVREMAPPER)
- install(TARGETS SPVRemapper
+ install(TARGETS SPVRemapper EXPORT SPVRemapperTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
- install(TARGETS SPIRV
+ install(TARGETS SPIRV EXPORT SPIRVTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
+
+ install(EXPORT SPVRemapperTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
+ install(EXPORT SPIRVTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/)
endif(ENABLE_GLSLANG_INSTALL)