summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-09-14 11:10:51 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-10-28 12:29:13 +0000
commit59fbaceae96c1b72bb952d1e5446473917b7c749 (patch)
treede598e9de5101b244e69115f2351740c2a7f1d58
parent9b185da0e8624a5c7c0bf71efd2f833752d01a8e (diff)
CMake: Use new _qt_internal_get_tool_wrapper_script_path
Change-Id: I3c8422f4568fc60cf6cd3c247e008cacdcb18249 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit b56f34ca6c24e440174c3c249594914cb470731b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/scxml/Qt6ScxmlMacros.cmake7
-rw-r--r--tests/auto/scion/CMakeLists.txt7
2 files changed, 8 insertions, 6 deletions
diff --git a/src/scxml/Qt6ScxmlMacros.cmake b/src/scxml/Qt6ScxmlMacros.cmake
index 066bade..ffaccaf 100644
--- a/src/scxml/Qt6ScxmlMacros.cmake
+++ b/src/scxml/Qt6ScxmlMacros.cmake
@@ -38,8 +38,8 @@ function(qt6_add_statecharts target_or_outfiles)
endif()
endif()
- _qt_internal_wrap_tool_command(qscxmlc_command SET
- "$<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qscxmlc>")
+ _qt_internal_get_tool_wrapper_script_path(tool_wrapper)
+ set(qscxmlc_bin "${tool_wrapper}" "$<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qscxmlc>")
set(outfiles)
foreach(it ${scxml_files})
@@ -50,7 +50,8 @@ function(qt6_add_statecharts target_or_outfiles)
set(outfile_h ${qscxmlcOutputDir}/${outfilename}.h)
add_custom_command(OUTPUT ${outfile_cpp} ${outfile_h}
- ${qscxmlc_command} ${namespace} ${ARGS_OPTIONS}
+ COMMAND
+ ${qscxmlc_bin} ${namespace} ${ARGS_OPTIONS}
--output ${outfile} ${infile}
DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::qscxmlc
MAIN_DEPENDENCY ${infile}
diff --git a/tests/auto/scion/CMakeLists.txt b/tests/auto/scion/CMakeLists.txt
index 9f7020a..9dd6db2 100644
--- a/tests/auto/scion/CMakeLists.txt
+++ b/tests/auto/scion/CMakeLists.txt
@@ -79,8 +79,8 @@ set(scxmls_dir ../../3rdparty/scion-tests/scxml-test-framework/test)
get_filename_component(scxmls_dir ${scxmls_dir} ABSOLUTE)
file(GLOB_RECURSE allscxmls ${scxmls_dir}/*.scxml)
-_qt_internal_wrap_tool_command(qscxmlc_command SET
- "$<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qscxmlc>")
+_qt_internal_get_tool_wrapper_script_path(tool_wrapper)
+set(qscxmlc_bin "${tool_wrapper}" "$<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::qscxmlc>")
set(scxmls)
set(inc_list)
@@ -111,7 +111,8 @@ foreach(f ${allscxmls})
file(TO_NATIVE_PATH ${out_cpp} native_out_cpp)
add_custom_command(
OUTPUT ${out_cpp} ${out_h}
- ${qscxmlc_command} --header ${native_out_h} --impl ${native_out_cpp}
+ COMMAND
+ ${qscxmlc_bin} --header ${native_out_h} --impl ${native_out_cpp}
--namespace ${sn} --classname ${cn} ${f}
DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::qscxmlc
VERBATIM