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 <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
This commit is contained in:
Mårten Nordheim 2019-09-13 10:35:29 +02:00
parent 7857256f59
commit 5884f793b9

View File

@ -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)