Handle install vs build include directories
Fix target_include_directories to appropriately handle build-tree and the install-tree.
This commit is contained in:
@@ -33,7 +33,9 @@ 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})
|
||||
@@ -46,12 +48,12 @@ if(ENABLE_GLSLANG_INSTALL)
|
||||
install(TARGETS spirv-remap EXPORT spirv-remapTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
install(EXPORT glslangValidatorTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
|
||||
install(EXPORT spirv-remapTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
|
||||
install(EXPORT glslangValidatorTargets DESTINATION lib/cmake)
|
||||
install(EXPORT spirv-remapTargets DESTINATION lib/cmake)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(EXPORT glslang-default-resource-limitsTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
|
||||
install(EXPORT glslang-default-resource-limitsTargets DESTINATION lib/cmake)
|
||||
endif()
|
||||
endif(ENABLE_GLSLANG_INSTALL)
|
||||
|
||||
Reference in New Issue
Block a user