qt5base-lts/qmake
Joerg Bornemann b1ad7f938e 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.

Pick-to: 6.1
Fixes: QTBUG-89170
Change-Id: I52673b1c8d40f40f56a74203065553115e2c4de5
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-03-02 22:00:51 +01:00
..
doc qmake: Update documentation that c++17 is the default 2021-02-19 09:59:14 +01:00
generators qmake: Introduce compile_included_sources CONFIG option 2021-02-08 12:07:54 +01:00
library Improve QMakeLibraryInfo encapsulation 2021-03-01 17:37:03 +01:00
cachekeys.h qmake: Fix qHash-related integer conversion warnings 2020-10-17 11:56:59 +02:00
CMakeLists.txt Generate information about user-facing applications in build dir 2021-03-02 22:00:51 +01:00
main.cpp Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE 2020-11-30 17:16:21 +01:00
meta.cpp qmake: Remove dead code 2019-04-05 07:48:34 +00:00
meta.h qmake: Remove dead code 2019-04-05 07:48:34 +00:00
option.cpp Improve QMakeLibraryInfo encapsulation 2021-03-01 17:37:03 +01:00
option.h Remove QMake's -createstub option 2019-08-03 14:48:10 +02:00
project.cpp Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00
project.h Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00
property.cpp Use Core library for qmake instead of the Bootstrap library 2021-02-25 16:08:43 +01:00
property.h
qmake_pch.h Move QRegExp and its remaining mentions out of QtCore 2020-07-13 10:53:23 +02:00
qmakelibraryinfo.cpp Improve QMakeLibraryInfo encapsulation 2021-03-01 17:37:03 +01:00
qmakelibraryinfo.h Improve QMakeLibraryInfo encapsulation 2021-03-01 17:37:03 +01:00