Merge pull request #1866 from rumblehhh/master

Export glslang targets on installation
This commit is contained in:
John Kessenich
2019-10-15 04:25:20 -06:00
committed by GitHub
8 changed files with 40 additions and 19 deletions

View File

@@ -33,21 +33,27 @@ endif(WIN32)
target_link_libraries(glslangValidator ${LIBRARIES})
target_link_libraries(spirv-remap ${LIBRARIES})
target_include_directories(glslangValidator PUBLIC ../External)
target_include_directories(glslangValidator PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../External>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/External>)
if(WIN32)
source_group("Source" FILES ${SOURCES})
endif(WIN32)
if(ENABLE_GLSLANG_INSTALL)
install(TARGETS glslangValidator
install(TARGETS glslangValidator EXPORT glslangValidatorTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS spirv-remap
install(TARGETS spirv-remap EXPORT spirv-remapTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(EXPORT glslangValidatorTargets DESTINATION lib/cmake)
install(EXPORT spirv-remapTargets DESTINATION lib/cmake)
if(BUILD_SHARED_LIBS)
install(TARGETS glslang-default-resource-limits
install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(EXPORT glslang-default-resource-limitsTargets DESTINATION lib/cmake)
endif()
endif(ENABLE_GLSLANG_INSTALL)