diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-02-07 14:12:27 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-02-10 15:07:34 +0000 |
commit | c431e2d33c2b13dee8b43a08c267c20ec1ae9654 (patch) | |
tree | 16e788115741efde11f35319c9b6b152c066ac70 /cmake/QtModuleConfig.cmake.in | |
parent | 360d9fba237906e90559bf3477a39caf392af415 (diff) |
Refactor Metatypes dependency propagation
Every metatypes.json files is now added as an INTERFACE source file to a
target. This enables us later to correctly collect all the
metatypes.json files from dependent targets. This information is also
correctly exported via export()/install().
To avoid the metatypes.json appearing in every target's source list,
the file path is wrapped in a generator expression which will only be
evaluated when the consuming target has the property
QT_CONSUMES_METATYPES set to true. At the moment this is limited to
targets which need to interact with qmltyperegistrar.
Change-Id: I0ffebcd069a923383f7ed11cde2c94ecf2fb13f3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtModuleConfig.cmake.in')
-rw-r--r-- | cmake/QtModuleConfig.cmake.in | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in index 80a2b6da58..b2e1511870 100644 --- a/cmake/QtModuleConfig.cmake.in +++ b/cmake/QtModuleConfig.cmake.in @@ -45,27 +45,6 @@ if(NOT _qt_module_target_type STREQUAL "INTERFACE_LIBRARY") endif() endif() -# Apply meta types properties -if (@QT_MODULE_HAS_META_TYPES_FILE@) - if (NOT QT_NO_CREATE_TARGETS) - set_target_properties("@INSTALL_CMAKE_NAMESPACE@::@target@" PROPERTIES - INTERFACE_QT_MODULE_HAS_META_TYPES TRUE - INTERFACE_QT_META_TYPES_INSTALL_FILE "@QT_MODULE_META_TYPES_FILE@" - INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "@QT_MODULE_META_TYPES_DEP_FILE@" - ) - endif() - - if (NOT QT_NO_CREATE_VERSIONLESS_TARGETS) - get_target_property(is_alias_target "Qt::@target@" ALIASED_TARGET) - if (NOT is_alias_target) - set_target_properties("Qt::@target@" PROPERTIES - INTERFACE_QT_MODULE_HAS_META_TYPES TRUE - INTERFACE_QT_META_TYPES_INSTALL_FILE "@QT_MODULE_META_TYPES_FILE@" - INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "@QT_MODULE_META_TYPES_DEP_FILE@" - ) - endif() - endif() -endif() # Load Module's BuildIntenals should any exist if (@INSTALL_CMAKE_NAMESPACE@BuildInternals_DIR AND |