From 106329a2adbc797504102eac1d7f6ef93cc3f941 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 22 Aug 2025 12:40:04 +0200 Subject: [PATCH] CMake: Fix execution of svgtoqml tool It fails in a no-prefix per-repo build of qtdeclarative standalone examples build, with the following error: ninja: error: 'examples/quick/quickshapes/weatherforecast/Qt6::svgtoqml', needed by 'examples/quick/quickshapes/weatherforecast/.qt/svgtoqml/Europe_generated.qml', missing and no known rule to make it Wrap the command in a genex, and prepend the tool wrapper shell script for Windows hosts. Amends 018b10ff710e75841b02e052f8d851723f555b7b Change-Id: Ib4aa91f3680cad40ac462a48b09a4acf795ff7ae Reviewed-by: Alexey Edelev --- tools/svgtoqml/Qt6SvgToQmlMacros.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/svgtoqml/Qt6SvgToQmlMacros.cmake b/tools/svgtoqml/Qt6SvgToQmlMacros.cmake index a981428671..fa60f91692 100644 --- a/tools/svgtoqml/Qt6SvgToQmlMacros.cmake +++ b/tools/svgtoqml/Qt6SvgToQmlMacros.cmake @@ -61,9 +61,13 @@ function(qt6_target_qml_from_svg target) list(APPEND svgtoqml_args "${file_absolute}") list(APPEND svgtoqml_args "${svgtoqml_result}") + _qt_internal_get_tool_wrapper_script_path(tool_wrapper) add_custom_command( OUTPUT "${svgtoqml_result}" - COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::svgtoqml ${svgtoqml_args} + COMMAND + ${tool_wrapper} + $ + ${svgtoqml_args} DEPENDS "${file_absolute}" ${QT_CMAKE_EXPORT_NAMESPACE}::svgtoqml