Handle install vs build include directories
Fix target_include_directories to appropriately handle build-tree and the install-tree.
This commit is contained in:
parent
ab6d1499e1
commit
c6f7294ced
8 changed files with 23 additions and 15 deletions
|
|
@ -86,7 +86,9 @@ add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${H
|
|||
set_property(TARGET glslang PROPERTY FOLDER glslang)
|
||||
set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
target_link_libraries(glslang OGLCompiler OSDependent)
|
||||
target_include_directories(glslang PUBLIC ..)
|
||||
target_include_directories(glslang PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
|
||||
if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
set_target_properties(glslang PROPERTIES PREFIX "")
|
||||
|
|
@ -114,7 +116,7 @@ if(ENABLE_GLSLANG_INSTALL)
|
|||
install(TARGETS glslang EXPORT glslangTargets
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
install(EXPORT glslangTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
|
||||
install(EXPORT glslangTargets DESTINATION lib/cmake)
|
||||
endif(ENABLE_GLSLANG_INSTALL)
|
||||
|
||||
if(ENABLE_GLSLANG_INSTALL)
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ endif()
|
|||
if(ENABLE_GLSLANG_INSTALL)
|
||||
install(TARGETS OSDependent EXPORT OSDependentTargets
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(EXPORT OSDependentTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
|
||||
install(EXPORT OSDependentTargets DESTINATION lib/cmake)
|
||||
endif(ENABLE_GLSLANG_INSTALL)
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@ endif(WIN32)
|
|||
if(ENABLE_GLSLANG_INSTALL)
|
||||
install(TARGETS OSDependent EXPORT OSDependentTargets
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(EXPORT OSDependentTargets DESTINATION ${LIB_INSTALL_DIR}/cmake)
|
||||
install(EXPORT OSDependentTargets DESTINATION lib/cmake)
|
||||
endif(ENABLE_GLSLANG_INSTALL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue