fix target include directories when not compiling stand-alone

This commit is contained in:
Heng Liu
2019-09-09 11:40:42 +02:00
parent 05ed441211
commit bb4ce58626
2 changed files with 2 additions and 2 deletions

View File

@@ -133,7 +133,7 @@ install(DIRECTORY IO/
endif ()
target_include_directories(OpenMeshCore PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
$<INSTALL_INTERFACE:include>)
install(TARGETS OpenMeshCore EXPORT OpenMeshConfig

View File

@@ -116,7 +116,7 @@ install(FILES Utils/getopt.h DESTINATION include/OpenMesh/Tools/Utils)
endif ()
target_include_directories(OpenMeshTools PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
$<INSTALL_INTERFACE:include>)
install(TARGETS OpenMeshTools EXPORT OpenMeshConfig