From c8335abf42174463f9def15393a42c35ffb5fe39 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 18 Aug 2021 12:31:42 +0200 Subject: 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 Reviewed-by: Joerg Bornemann --- src/qml/Qt6QmlBuildInternals.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qml/Qt6QmlBuildInternals.cmake') 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 -- cgit v1.2.3