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 /util | |
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 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 0bb68ee936..5d525b3e57 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -3246,6 +3246,9 @@ def write_main_part( # Footer: cm_fh.write(f"{spaces(indent)})\n") + if typename == "Tool": + cm_fh.write(f"{spaces(indent)}qt_internal_return_unless_building_tools()\n") + write_resources(cm_fh, name, scope, indent, target_ref=target_ref) write_statecharts(cm_fh, name, scope, indent) |