Fix imported target include directory

Fix the imported target include directory when the headers are not installed in '${CMAKE_INSTALL_PREFIX}/include'.
pull/4337/head
Ben Wolsieffer 2022-01-09 19:25:02 -05:00
parent 8134cae998
commit 629c8850ec
1 changed files with 2 additions and 2 deletions

View File

@ -1177,7 +1177,7 @@ TARGET_COMPILE_FEATURES(assimp PRIVATE c_std_99)
TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:${ASSIMP_INCLUDE_INSTALL_DIR}>
)
IF(ASSIMP_HUNTER_ENABLED)
@ -1311,7 +1311,7 @@ INSTALL( TARGETS assimp
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR}
FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
COMPONENT ${LIBASSIMP_COMPONENT}
INCLUDES DESTINATION include
INCLUDES DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}
)
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)