From bc54f0b16481ec7e6767928c2ae7e79f904440d0 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 5 Sep 2019 15:22:14 +0200 Subject: [PATCH] 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 --- cmake/QtBuild.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index c8788872549..94354395530 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}" + "$" + "$" ${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}") + "$" + "$") list(APPEND public_includes # For the syncqt headers