diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-02-11 14:01:58 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-03-07 08:55:52 +0100 |
commit | 94f28c2ed027d896d5100caa7c858a2c5310c882 (patch) | |
tree | 455f37f484363a9b54a3e9badfcf7e8be9fb569d /qmake | |
parent | 82f4c5ebe5c242d62706377f281432f883dd1e2a (diff) |
Generate information about user-facing applications in build dir
When packaging different Qt versions for Linux distributions (or any
distribution with a common bin dir), Qt tools cannot be installed to
/usr/bin, because the executable names of the different Qt versions
clash.
To solve this conflict, our recommendation is to install Qt's tools to
/usr/lib/qt6/bin and to create versioned symlinks to user-facing tools
in /usr/bin.
User-facing tools are tools that are supposed to be started manually by
the user. They are marked in Qt's build system. Distro package
maintainers can now configure with
-DCMAKE_INSTALL_PREFIX=/usr
-DINSTALL_BINDIR=/usr/lib/qt6/bin
-DINSTALL_PUBLICBINDIR=/usr/bin
and will find a file called user_facing_tool_links.txt in the build
directory after the cmake run. Nothing will be installed to
INSTALL_PUBLICBINDIR.
Each line of user_facing_tool_links.txt consists of the installation
path of a user-facing application followed by a space and the versioned
link name in INSTALL_PUBLICBINDIR.
Example content:
/usr/lib/qt6/bin/qmake /usr/bin/qmake6
To actually create the versioned symlinks, the content of this file can
be fed to ln like this:
xargs ln -s < build-dir/user_facing_tool_links.txt
Or the package maintainer may decide to do something completely
different as suits their needs.
This patch adds the USER_FACING argument to qt_internal_add_tool to mark
tools as user-facing. In addition, every Qt created by
qt_internal_add_app is treated as user-facing.
The only tool this patch marks as user-facing in qtbase is qmake.
Fixes: QTBUG-89170
Change-Id: I52673b1c8d40f40f56a74203065553115e2c4de5
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit b1ad7f938e2f71288e65a8c9a86b732b89a6a345)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/CMakeLists.txt b/qmake/CMakeLists.txt index 3897ea192c..35c5849266 100644 --- a/qmake/CMakeLists.txt +++ b/qmake/CMakeLists.txt @@ -8,7 +8,7 @@ qt_get_tool_target_name(target_name qmake) qt_internal_add_tool(${target_name} NO_QT # special case TOOLS_TARGET Core # special case - # GUI # special case: remove this + USER_FACING SOURCES ../src/3rdparty/pcre2/src/config.h ../src/3rdparty/pcre2/src/pcre2.h |