aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/Qt6QmlBuildInternals.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-08-18 12:31:42 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-08-18 15:28:22 +0200
commitc8335abf42174463f9def15393a42c35ffb5fe39 (patch)
tree48b7fc0058bb3b6858cd8c61465776542ebf8852 /src/qml/Qt6QmlBuildInternals.cmake
parent503343c00415d2193e36d8d22415c6cd2a304986 (diff)
CMake: Don't install metatypes json files for user qml modules
We shouldn't install metatypes json files for user created qml modules without allowing the project to say where they should be installed. Instead we should introduce new API to allow extracting the created json files so the user project decides where to install the files, similar how we would do it for other artifacts like the qmldir file or qmltypes file. Because it's too late to introduce such API for 6.2, disable installation of the files for user projects, but keep it for Qt provided qml modules. Once qt6_extract_metatypes in qtbase is fixed not to install the files by default, we should remove the newly introduced internal options and use a better mechanism for piping through when and where the files should be installed. Amends 1c4ba17015fe99da48ce73fab75ecc60cf9cb975 Pick-to: 6.2 Task-number: QTBUG-95845 Change-Id: Id8f6cd6d06aa58d42c72f62ef7458cfaf244b2cd Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlBuildInternals.cmake')
-rw-r--r--src/qml/Qt6QmlBuildInternals.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake
index 8bc8b292fe..3b9e99c782 100644
--- a/src/qml/Qt6QmlBuildInternals.cmake
+++ b/src/qml/Qt6QmlBuildInternals.cmake
@@ -261,6 +261,7 @@ function(qt_internal_add_qml_module target)
# Update the backing and plugin targets with qml-specific things.
qt6_add_qml_module(${target}
${add_qml_module_args}
+ __QT_INTERNAL_INSTALL_METATYPES_JSON
OUTPUT_DIRECTORY ${arg_OUTPUT_DIRECTORY}
RESOURCE_PREFIX "/qt-project.org/imports"
OUTPUT_TARGETS output_targets