summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-09-24 11:39:26 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-09-24 12:54:57 +0000
commit6e2ca1d6cb12d37a00d0c61b1aac317df02ac786 (patch)
tree54c991497356c8a6259dac179a1b124cb817da79 /cmake
parentd64fa78829893ef54fced18d0ed306a482794e02 (diff)
Add SKIP_TYPE_REGISTRATION option to add_qml_module
If the qml files are not listed in the qmldir file they do not need to be written again, since it is expected that they are registered by the c++ plugin code. Change-Id: I624aedb182583f942bf1d1a322861c47a64b5065 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 8f249a15fe..409907bf58 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -2049,12 +2049,15 @@ endfunction()
# VERSION: Version of the qml module
# QML_PLUGINDUMP_DEPENDENCIES: Path to a dependencies.json file to be consumed
# with the ${target}_qmltypes target (optional)
+# SKIP_TYPE_REGISTRATION: All qml files are expected to be registered by the
+# c++ plugin code.
#
function(add_qml_module target)
set(qml_module_optional_args
DESIGNER_SUPPORTED
DO_NOT_INSTALL
+ SKIP_TYPE_REGISTRATION
)
set(qml_module_single_args
@@ -2130,9 +2133,14 @@ function(add_qml_module target)
set(designer_supported_arg DESIGNER_SUPPORTED)
endif()
+ if (arg_SKIP_TYPE_REGISTRATION)
+ set(skip_registration_arg SKIP_TYPE_REGISTRATION)
+ endif()
+
qt6_add_qml_module(${target}
${designer_supported_arg}
${no_create_option}
+ ${skip_registration_arg}
${classname_arg}
RESOURCE_PREFIX "/qt-project.org/imports"
TARGET_PATH ${arg_TARGET_PATH}