summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-01-28 11:23:20 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-18 15:45:06 +0000
commit49f32b2650b07240e08789c302c5ae7c2ff584bf (patch)
tree4034f01c3798b3e2c9bab6efcfc1a492a03b89d5
parent34702411617f899517d949e2c83c9dd306ebd43a (diff)
qmake: Introduce QT_HOST_LIBEXECS property
This will be used to access host tools that are installed in ${prefix}/libexec instead of ${prefix}/bin. Change-Id: I36c4b5736330f8229d267a117c65d55cd5e12758 Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit edd122548940a0213e35d11649566efbef7f1fea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/QtQmakeHelpers.cmake1
-rw-r--r--mkspecs/features/qt_config.prf3
-rw-r--r--qmake/doc/src/qmake-manual.qdoc3
-rw-r--r--qmake/property.cpp1
-rw-r--r--src/corelib/global/qlibraryinfo.cpp9
-rw-r--r--src/corelib/global/qlibraryinfo.h1
6 files changed, 16 insertions, 2 deletions
diff --git a/cmake/QtQmakeHelpers.cmake b/cmake/QtQmakeHelpers.cmake
index c06561b9bd..cf15ada7b3 100644
--- a/cmake/QtQmakeHelpers.cmake
+++ b/cmake/QtQmakeHelpers.cmake
@@ -56,6 +56,7 @@ function(qt_generate_qconfig_cpp)
qt_add_string_to_qconfig_cpp("") # config.input.sysroot
qt_add_string_to_qconfig_cpp("false") # qmake_sysrootify
qt_add_string_to_qconfig_cpp("${INSTALL_BINDIR}")
+ qt_add_string_to_qconfig_cpp("${INSTALL_LIBEXECDIR}")
qt_add_string_to_qconfig_cpp("${INSTALL_LIBDIR}")
qt_add_string_to_qconfig_cpp("${hostdatadir}")
qt_add_string_to_qconfig_cpp("${QT_QMAKE_TARGET_MKSPEC}")
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 93c54e3010..40105f0ab2 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -26,6 +26,7 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS]
+ QT_MODULE_HOST_LIBEXEC_BASE = $$[QT_HOST_LIBEXECS]
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
include($$mod)
}
@@ -35,8 +36,8 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
unset(QT_MODULE_INCLUDE_BASE)
unset(QT_MODULE_LIB_BASE)
unset(QT_MODULE_HOST_LIB_BASE)
+ unset(QT_MODULE_HOST_LIBEXEC_BASE)
unset(QT_MODULE_BIN_BASE)
}
load(qt_functions)
-
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index 9e25c2726e..f132aab310 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -4312,6 +4312,9 @@
and stored in the \l{QMAKESPEC} variable during a target build
\li QT_HOST_BINS - location of host executables
\li QT_HOST_DATA - location of data for host executables used by qmake
+ \li QT_HOST_LIBS - location of host libraries
+ \li QT_HOST_LIBEXECS - location of executables required by host
+ libraries at runtime
\li QT_HOST_PREFIX - default prefix for all host paths
\li QT_INSTALL_ARCHDATA - location of general architecture-dependent Qt
data
diff --git a/qmake/property.cpp b/qmake/property.cpp
index 2dc41ece0e..717f9f4e1b 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -63,6 +63,7 @@ static const struct {
{ "QT_HOST_DATA", QLibraryInfo::HostDataPath, true, false },
{ "QT_HOST_BINS", QLibraryInfo::HostBinariesPath, true, false },
{ "QT_HOST_LIBS", QLibraryInfo::HostLibrariesPath, true, false },
+ { "QT_HOST_LIBEXECS", QLibraryInfo::HostLibraryExecutablesPath, true, false },
{ "QMAKE_SPEC", QLibraryInfo::HostSpecPath, true, true },
{ "QMAKE_XSPEC", QLibraryInfo::TargetSpecPath, true, true },
};
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index a86436f4c8..3c7e16738e 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -365,8 +365,14 @@ QVersionNumber QLibraryInfo::version() noexcept
* - add to qt_config.prf, qt_module.prf, qt_module_fwdpri.prf
*/
+#ifdef QT_BUILD_QMAKE
+constexpr size_t qtConfEntriesKeySize = 23;
+#else
+constexpr size_t qtConfEntriesKeySize = 19;
+#endif
+
static const struct {
- char key[19], value[13];
+ char key[qtConfEntriesKeySize], value[13];
} qtConfEntries[] = {
{ "Prefix", "." },
{ "Documentation", "doc" }, // should be ${Data}/doc
@@ -389,6 +395,7 @@ static const struct {
{ "Sysroot", "" },
{ "SysrootifyPrefix", "" },
{ "HostBinaries", "bin" },
+ { "HostLibraryExecutables", "libexec" },
{ "HostLibraries", "lib" },
{ "HostData", "." },
{ "TargetSpec", "" },
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 04956052b3..741dc8b30f 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -78,6 +78,7 @@ public:
SysrootPath,
SysrootifyPrefixPath,
HostBinariesPath,
+ HostLibraryExecutablesPath,
HostLibrariesPath,
HostDataPath,
TargetSpecPath,