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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user