From a865522e67806d1dd84df83c837030cb38d7395a Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 28 May 2019 17:55:28 +0200 Subject: [PATCH] Use existing TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE --- cmake/modules/LibraryTarget.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/modules/LibraryTarget.cmake b/cmake/modules/LibraryTarget.cmake index 6134179..897486a 100644 --- a/cmake/modules/LibraryTarget.cmake +++ b/cmake/modules/LibraryTarget.cmake @@ -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 ()