From 5884f793b9248d95a923a33663aa26386a6c4bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 13 Sep 2019 10:35:29 +0200 Subject: [PATCH] Don't set the MODULE_HEADER property on header-only modules They're INTERFACE-type targets and can thus only have whitelisted properties set. That fixes the cmake configure step for the UiPlugin target in qttools. This has the unfortunate side-effect that the headers will not be picked up for our pre-compiled headers. Although it is not a big issue since we don't have many header-only modules. An example is QtTools' UiPlugin. Amends 2cf0ba1fba9293b3265a186527dbc90d395dfd20 Change-Id: If722928f64727ffaf2e9d0746668c0198fa1a647 Reviewed-by: Simon Hausmann Reviewed-by: Qt CMake Build Bot --- cmake/QtBuild.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 4ce9ad9b43..b4c28ac84d 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -1308,7 +1308,9 @@ function(add_qt_module target) set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${module_headers_public}") set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${module_include_dir}/${module}Depends") set_property(TARGET "${target}" APPEND PROPERTY PRIVATE_HEADER "${module_headers_private}") - set_property(TARGET "${target}" PROPERTY MODULE_HEADER "${module_include_dir}/${module}") + if (NOT ${arg_HEADER_MODULE}) + set_property(TARGET "${target}" PROPERTY MODULE_HEADER "${module_include_dir}/${module}") + endif() if(module_headers_qpa) qt_install(FILES ${module_headers_qpa} DESTINATION ${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}/${module}/qpa)