aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmltime
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-09-27 13:36:54 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-10-08 10:37:35 +0200
commit0d6d3c7bc50e1ab08b66449b7bb9239a97bfed4e (patch)
treeead4dee258c1d2ee6cacdc79cc620be9492e3747 /tools/qmltime
parent49e549934dbd993e9e352a5719f85d1a5475a2f5 (diff)
Skip unnecessary commands when cross-building tools
Call qt_internal_return_unless_building_tools() directly after qt_internal_add_tool() to avoid having to special-case code for when this function only creates imported targets in cross-builds. Task-number: QTBUG-85084 Change-Id: I5c8f2ecdf4936cfd15cb530e896bc4e5b5531620 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tools/qmltime')
-rw-r--r--tools/qmltime/CMakeLists.txt7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/qmltime/CMakeLists.txt b/tools/qmltime/CMakeLists.txt
index d4569af23a..7f896b7639 100644
--- a/tools/qmltime/CMakeLists.txt
+++ b/tools/qmltime/CMakeLists.txt
@@ -16,12 +16,7 @@ qt_internal_add_tool(${target_name}
Qt::Quick
Qt::QuickPrivate
)
-
-# Don't set properties on a host tool when cross compiling, because it
-# is not being built.
-if(CMAKE_CROSSCOMPILING AND NOT QT_BUILD_TOOLS_WHEN_CROSSCOMPILING)
- return()
-endif()
+qt_internal_return_unless_building_tools()
# Turn the tool into its own self-contained qml module
qt6_add_qml_module(${target_name}