aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/CMakeLists.txt
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-11-15 10:52:30 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-11-24 18:34:03 +0100
commitd9aad31a22ff86ec6de5a01a047f1718bb511939 (patch)
treef23b23bace32d5b17330096ce8e9fa909a25f867 /src/qml/CMakeLists.txt
parent7d991d78d210eebe5ed81d37dfd27106c77a6868 (diff)
QtQml: Have qmltyperegistrar generate jsroot.qmltypes
There is no need to keep the file in the repository if qmltyperegistrar can generate it on the fly. Change-Id: I6ca129eeffbd4ed57c31e1f538f417850183037e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/CMakeLists.txt')
-rw-r--r--src/qml/CMakeLists.txt14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt
index 54aa328fb1..254adb9fe8 100644
--- a/src/qml/CMakeLists.txt
+++ b/src/qml/CMakeLists.txt
@@ -517,12 +517,18 @@ endif()
_qt_internal_qml_type_registration(QmlBuiltins ${builtins_typeregistration_args})
add_dependencies(QmlBuiltins QQmlComponentJson)
+_qt_internal_get_tool_wrapper_script_path(tool_wrapper)
add_custom_command(
- OUTPUT "${qml_build_dir}/jsroot.qmltypes"
- DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/jsroot.qmltypes"
+ OUTPUT
+ "${qml_build_dir}/jsroot.qmltypes"
+ DEPENDS
+ ${QT_CMAKE_EXPORT_NAMESPACE}::qmltyperegistrar
COMMAND
- "${CMAKE_COMMAND}" -E copy_if_different
- "${CMAKE_CURRENT_SOURCE_DIR}/jsroot.qmltypes" "${qml_build_dir}"
+ ${tool_wrapper}
+ $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qmltyperegistrar>
+ --jsroot --generate-qmltypes "${qml_build_dir}/jsroot.qmltypes"
+ COMMENT "Generating jsroot.qmltypes"
+ VERBATIM
)
set(builtins_output_files "")