summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Le <[email protected]>2025-01-21 14:33:59 +0100
committerCristian Le <[email protected]>2025-01-23 15:25:48 +0100
commita9964422360c637c7a46f85628a580448bb13bc1 (patch)
treec3e47f7da857fe97f17d2582ae3fcd72db68ce25
parent1192f2c87778c90530553cc62e763afaa0b6456e (diff)
Export `INSTALL_PUBLICBINDIR` to `QtBuildInternalsExtra.cmake`
`INSTALL_PUBLICBINDIR` is only exported if it was defined by the user when building QtBase. The conditional check aligns with the one used in `qt_internal_generate_user_facing_tools_info` Fixes: QTBUG-107016 Pick-to: 6.8 6.9 Change-Id: Id5c38555e1d22cb3c16d85261cb052c695b4de03 Reviewed-by: Alexandru Croitor <[email protected]>
-rw-r--r--cmake/QtBuildPathsHelpers.cmake9
-rw-r--r--cmake/QtPostProcessHelpers.cmake5
2 files changed, 14 insertions, 0 deletions
diff --git a/cmake/QtBuildPathsHelpers.cmake b/cmake/QtBuildPathsHelpers.cmake
index 7befe19a8ab..be2e26bc4a0 100644
--- a/cmake/QtBuildPathsHelpers.cmake
+++ b/cmake/QtBuildPathsHelpers.cmake
@@ -202,6 +202,15 @@ macro(qt_internal_setup_configure_install_paths)
"Module description files directory")
qt_configure_process_path(INSTALL_SBOMDIR "${INSTALL_ARCHDATADIR}/sbom"
"SBOM [PREFIX/sbom]")
+
+ # INSTALL_PUBLICBINDIR is processed only if it is not empty
+ # See usage in qt_internal_generate_user_facing_tools_info
+ if(NOT "${INSTALL_PUBLICBINDIR}" STREQUAL "")
+ # A default value is not needed because it is always manually defined
+ # but as per the documentation it is typically `bin`
+ qt_configure_process_path(INSTALL_PUBLICBINDIR "bin"
+ "Symlinked user-facing executables")
+ endif()
endmacro()
macro(qt_internal_set_cmake_install_libdir)
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index 62b99c8c926..b109b861c40 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -587,6 +587,11 @@ function(qt_generate_install_prefixes out_var)
INSTALL_PLUGINSDIR INSTALL_LIBEXECDIR INSTALL_QMLDIR INSTALL_DATADIR INSTALL_DOCDIR
INSTALL_TRANSLATIONSDIR INSTALL_SYSCONFDIR INSTALL_EXAMPLESDIR INSTALL_TESTSDIR
INSTALL_DESCRIPTIONSDIR INSTALL_SBOMDIR)
+ # INSTALL_PUBLICBINDIR is processed only if it is not empty
+ # See usage in qt_internal_generate_user_facing_tools_info
+ if(NOT "${INSTALL_PUBLICBINDIR}" STREQUAL "")
+ list(APPEND vars INSTALL_PUBLICBINDIR)
+ endif()
foreach(var ${vars})
get_property(docstring CACHE "${var}" PROPERTY HELPSTRING)