diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-09-05 15:22:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-09-05 13:36:47 +0000 |
commit | bc54f0b16481ec7e6767928c2ae7e79f904440d0 (patch) | |
tree | 28b48e6fc5e4559d8eaad3443b342fce20ca9861 /cmake | |
parent | b2a11daaa177805d36e33ca57e94093919107269 (diff) |
Fix build of installed header-only modules in non-prefix builds
QtUiTools in qttools is a public module that has only headers, so it's
an interface library in cmake. That means INTERFACE_INCLUDE_DIRECTORIES
cannot contain paths to the source or build directory, unless they are
prefixed with BUILD_INTERFACE, which this patch adds.
Change-Id: I047700f447237dfbe5a901072eb413a159ae537d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBuild.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index c878887254..9435439553 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -1305,8 +1305,8 @@ function(add_qt_module target) endif() set(private_includes - "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_BINARY_DIR}" + "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" + "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>" ${arg_INCLUDE_DIRECTORIES} ) @@ -1316,8 +1316,8 @@ function(add_qt_module target) # from another module. if(NOT arg_NO_SYNC_QT) list(APPEND private_includes - "${module_include_dir}/${PROJECT_VERSION}" - "${module_include_dir}/${PROJECT_VERSION}/${module}") + "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}>" + "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>") list(APPEND public_includes # For the syncqt headers |