Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2.2, 6.3.0 Alpha
-
None
Description
We ship a few different types of executables with Qt, but we currently don't categorize all of them correctly and some executable categories are missing / can't be handled quite correctly by the APIs that we provide (qt_internal_add_app / qt_internal_add_tool).
We should try to come up with a proper model and re-categorize all existing tools as needed.
Summary after discussing internally:
TLDR: Add a new NO_REQUIRE_HOST_TOOL option to qt_internal_add_tool and re-visit each executable that it uses the proper options.
All Qt Executables
We seem to have executables with four parameters:
- user-facing vs. internal
- maybe built when cross-compiling
- maybe creates a target in host Qt that can be imported in target Qt
- maybe required in host Qt when building target Qt
Currently, from "creates a target in host Qt that can be imported in
target Qt" implies "is required in host Qt". We might want to have
executables that create targets in the host Qt but that are not
required in the target Qt (platform-specific executables like windeployqt)
user-facing vs. internal
Executables that are supposed to be called by the user are called
"user-facing". These are placed in INSTALL_BINDIR.
Executables that are not user-facing are placed in INSTALL_LIBEXECDIR.
apps
by default:
- user-facing
- built when cross-compiling
- does not create a target in host Qt that can be imported in target Qt
- not required in host Qt when building target Qt
changing the defaults:
- user-facing:
can be made internal by placing in INSTALL_LIBEXECDIR
Example: sdpscanner in qtconnectivity - built when cross-compiling: always true?
except iOS where we use qt_exclude_tool_directories_from_default_target
for Assistant App, but Assistant will become a tool so not needed there - does not create a target in host Qt that can be imported in target
Qt: always true - not required when building Qt: always true
tools
by default:
- internal
- not built when cross-compiling
- creates a target in host Qt that can be imported in target Qt
- required in host Qt when building target Qt
changing the defaults:
- internal: can be marked as USER_FACING
- built when cross-compiling: can be changed for all tools with
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON, individual tools can be
skipped for cross-compilation by conditionally adding their
subdirectory (windeployqt case) - creates a target in host Qt that can be imported in target Qt:
cannot be changed - required in host Qt when building target Qt:
can be changed via new (to be implemented) NO_REQUIRE_HOST_TOOL
option (better naming pending) for cases like windeployqt
"tools" and "apps" are just "default parameter sets" for creating Qt executables,
which can be further customized to meet specific needs.
One particularly interesting set of tools are those that are only cross-compiled when
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING is ON, these intended to be used on the target platform
as developer tools when building Qt projects (Assistant, Designer, deployqt tools,
qmllint, qmlformat, etc)
https://wiki.qt.io/Qt_Build_System_Glossary#Apps_and_tools_shipped_by_Qt
Attachments
Issue Links
- relates to
-
QTBUG-99295 The tool "Qt6::sdpscanner" was not found
-
- Closed
-
-
QTBUG-92591 QtDeclarative autotest configure fails on Android builds
-
- Closed
-
-
QTBUG-100040 Configuring qtdeclarative fails for qmljs, qmljsrootgen and qjstest fails when cross-compiling
-
- Closed
-