aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtCreatorAPI.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake
index 82f7897b6d5..993102e139a 100644
--- a/cmake/QtCreatorAPI.cmake
+++ b/cmake/QtCreatorAPI.cmake
@@ -229,7 +229,11 @@ function(set_public_includes target includes)
if (NOT IS_ABSOLUTE ${inc_dir})
set(inc_dir "${CMAKE_CURRENT_SOURCE_DIR}/${inc_dir}")
endif()
- target_include_directories(${target} PUBLIC $<BUILD_INTERFACE:${inc_dir}>)
+ file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${inc_dir})
+ target_include_directories(${target} PUBLIC
+ $<BUILD_INTERFACE:${inc_dir}>
+ $<INSTALL_INTERFACE:include/${include_dir_relative_path}>
+ )
endforeach()
endfunction()