From e8007671d4ec6d791cb337b297f2beb7e5300929 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 8 Oct 2020 14:18:53 +0200 Subject: CMake: Allow installation of qmltypes files This is what qmake does on install_qmltypes and we do want to install the qmltypes files of our own modules. Change-Id: Iad430aab87f21331abf332ca5c92f9d7edc47bb0 Reviewed-by: Alexandru Croitor --- src/qml/Qt6QmlBuildInternals.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/qml/Qt6QmlBuildInternals.cmake') diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake index b4cce0349a..d74b1d55fe 100644 --- a/src/qml/Qt6QmlBuildInternals.cmake +++ b/src/qml/Qt6QmlBuildInternals.cmake @@ -23,6 +23,7 @@ function(qt_internal_add_qml_module target) set(qml_module_optional_args GENERATE_QMLTYPES + INSTALL_QMLTYPES DESIGNER_SUPPORTED DO_NOT_INSTALL SKIP_TYPE_REGISTRATION @@ -113,6 +114,10 @@ function(qt_internal_add_qml_module target) set(generate_qmltypes_arg GENERATE_QMLTYPES) endif() + if (arg_INSTALL_QMLTYPES) + set(install_qmltypes_arg INSTALL_QMLTYPES) + endif() + qt_path_join(qml_module_install_dir ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/${arg_TARGET_PATH}") qt6_add_qml_module(${target} @@ -122,6 +127,7 @@ function(qt_internal_add_qml_module target) ${plugin_optional_arg} ${classname_arg} ${generate_qmltypes_arg} + ${install_qmltypes_arg} RESOURCE_PREFIX "/qt-project.org/imports" TARGET_PATH ${arg_TARGET_PATH} URI ${arg_URI} -- cgit v1.2.3