diff options
author | Craig Scott <craig.scott@qt.io> | 2021-09-23 17:42:06 +1000 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-24 16:21:10 +0000 |
commit | cc60cf83db6bbf9775b1f7747a48d6b7eb24e585 (patch) | |
tree | db7426ea5648843bdecb97b5baf0e9cf4c411048 /src/corelib/Qt6CoreMacros.cmake | |
parent | 906509655d7a2a8da8b17315ef73cffe735a5461 (diff) |
Add docs for qt_extract_metatypes()v6.2.0
Also tidy up the inline TODO comments to reduce duplication and address
some minor inconsistencies.
Task-number: QTBUG-95712
Change-Id: Ic0d27f3c0a356fd311bba95de967faaea05e0f0a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 03104825d2187eca12fbfd142001618c8535eb76)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/Qt6CoreMacros.cmake')
-rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index a927d4b91e..51fa960c5b 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -955,26 +955,6 @@ if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) endfunction() endif() -# Extracts metatypes from a Qt target and generates a metatypes.json for it. -# -# By default we check whether AUTOMOC has been enabled and we extract the information from the -# target's AUTOMOC supporting files. -# -# Should you not wish to use AUTOMOC you need to pass in all the generated json files via the -# MANUAL_MOC_JSON_FILES parameter. The latter can be obtained by running moc with -# the --output-json parameter. -# Params: -# OUTPUT_FILES: a variable name in which to store the list of the extracted metatype json files. -# A typical use case would to install them. -# -# TODO: Move these internal options out into an internal function to be used by Qt only. -# __QT_INTERNAL_INSTALL_DIR: Location where to install the metatypes file. For public consumption, -# defaults to a ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}/metatypes -# directory. -# Executable metatypes files are never installed. -# __QT_INTERNAL_NO_INSTALL: When passed, will skip installation of the metatype file. -# __QT_INTERNAL_INSTALL: Installs the metatypes files into the default Qt metatypes folder. -# Only to be used by the Qt build. function(qt6_extract_metatypes target) get_target_property(existing_meta_types_file ${target} INTERFACE_QT_META_TYPES_BUILD_FILE) @@ -984,13 +964,20 @@ function(qt6_extract_metatypes target) set(args_option # TODO: Remove this once all leaf module usages of it are removed. It's now a no-op. + # It's original purpose was to skip installation of the metatypes file. __QT_INTERNAL_NO_INSTALL # TODO: Move this into a separate internal function, so it doesn't pollute the public one. + # When given, metatypes files will be installed into the default Qt + # metatypes folder. Only to be used by the Qt build. __QT_INTERNAL_INSTALL ) set(args_single # TODO: Move this into a separate internal function, so it doesn't pollute the public one. + # Location where to install the metatypes file. Only used if + # __QT_INTERNAL_INSTALL is given. It defaults to the + # ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}/metatypes directory. + # Executable metatypes files are never installed. __QT_INTERNAL_INSTALL_DIR OUTPUT_FILES |