diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-09-14 21:02:14 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-09-27 16:34:23 +0200 |
commit | a0e56294c1e80f34147c5a992b314776e1b6c757 (patch) | |
tree | 95128ad19a17efadc06b5676094be57c344886f5 /qmake | |
parent | 326d94e94b513a7d5be17493d57d31cf3329cb72 (diff) |
Skip unnecessary commands when cross-building tools
Introduce a new macro qt_internal_return_unless_building_tools which
simply calls return() if tools are not built. This macro is supposed to
be called after qt_internal_add_tool().
Using this macro avoids having to special-case code for when
qt_internal_add_tool() creates imported targets in cross-builds.
Adjust pro2cmake accordingly.
Task-number: QTBUG-85084
Change-Id: I9e1c455c29535dd8c318efa890ebd739c42effc1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt index 1ad10b950e..6a37fb981c 100644 --- a/qmake/CMakeLists.txt +++ b/qmake/CMakeLists.txt @@ -97,6 +97,7 @@ qt_internal_add_tool(${target_name} Qt::CorePrivate QtLibraryInfo ) +qt_internal_return_unless_building_tools() # Add QMAKE_VERSION_STR only if qmake is part of the build. target_compile_definitions(QtLibraryInfo PUBLIC |