diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-12-01 14:33:13 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-12-02 08:59:12 +0100 |
commit | 9aba23c99ed59765a6991089c05c98f35e549c51 (patch) | |
tree | 48081b04d37ed86dee500aa4b9afca6f9ff4f431 /src/qml/Qt6QmlMacros.cmake | |
parent | 7ff04f1e1f91e12e9c4e71e92eb8c09029ecf53f (diff) |
Allow passing --qmljs-runtime to the qmlcachegen implementation
This signals qmlcachegenplus to not paste the whole JavaScript type
system into each generated file. In turn, user projects need to add a
dependency in order to build against the JS runtime.
qmlcachegen ignores the option.
Change-Id: I0f87dedb969e99e94fbb712b7faa23d84f76dfbe
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlMacros.cmake')
-rw-r--r-- | src/qml/Qt6QmlMacros.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index 3f23a4f63d..9d17dfd501 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -947,6 +947,11 @@ function(_qt_internal_quick_compiler_process_resources target resource_name) list(APPEND qmlcachegen_extra_args "--direct-calls") endif() + get_target_property(qmljs_runtime ${target} QT_QMLCACHEGEN_QMLJS_RUNTIME) + if (qmljs_runtime) + list(APPEND qmlcachegen_extra_args "--qmljs-runtime") + endif() + foreach(file IN LISTS qml_files) get_filename_component(file_absolute ${file} ABSOLUTE) file(RELATIVE_PATH file_relative ${CMAKE_CURRENT_SOURCE_DIR} ${file_absolute}) |