Use existing TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE

This commit is contained in:
Martchus 2019-05-28 17:55:28 +02:00
parent 8729fb1e87
commit a865522e67
1 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,9 @@ if (NOT BUILTIN_TRANSLATIONS)
endif ()
# determine include path used when building the project itself
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include")
if (TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE)
# use existing TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE if already defined
elseif (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include")
# use special include directory if available
set(TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
else ()