summaryrefslogtreecommitdiffstats
path: root/cmake/QtAppHelpers.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-02-26 11:04:00 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-03-25 10:24:57 +0100
commitc19d957f45fa27f61b5ecc566f8dbc19f12a44c3 (patch)
treef68f3eb9707ac5e2fe8f3fc22b261e7a8d955d18 /cmake/QtAppHelpers.cmake
parent74b7d5643f78ee3bda8d3b2b47d2b9fd539cdd5a (diff)
Add a way to install versioned hard-links for tools
Add the option argument INSTALL_VERSIONED_LINK to qt_internal_add_tool and qt_internal_add_app. For tools/apps with this argument we create an install rule that creates a versioned hard link. For example, for bin/qmake we create bin/qmake6. Note that this only applies to prefix builds. Apply this argument to qmake. The qt_internal_add_app change is necessary for qtdiag and in qttools. Pick-to: dev Task-number: QTBUG-89170 Change-Id: Id32d6055544c475166f4d854aaeb6292fbb5fbb5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtAppHelpers.cmake')
-rw-r--r--cmake/QtAppHelpers.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/QtAppHelpers.cmake b/cmake/QtAppHelpers.cmake
index 846a85028f..c40488cc66 100644
--- a/cmake/QtAppHelpers.cmake
+++ b/cmake/QtAppHelpers.cmake
@@ -3,7 +3,7 @@
function(qt_internal_add_app target)
qt_parse_all_arguments(arg
"qt_internal_add_app"
- "NO_INSTALL"
+ "NO_INSTALL;INSTALL_VERSIONED_LINK"
"${__default_target_info_args}"
"${__default_private_args}"
${ARGN})
@@ -52,6 +52,11 @@ function(qt_internal_add_app target)
# Consider every app as user facing tool.
set_property(GLOBAL APPEND PROPERTY QT_USER_FACING_TOOL_TARGETS ${target})
+ # Install versioned link if requested.
+ if(NOT arg_NO_INSTALL AND arg_INSTALL_VERSIONED_LINK)
+ qt_internal_install_versioned_link("${INSTALL_BINDIR}" ${target})
+ endif()
+
qt_add_list_file_finalizer(qt_internal_finalize_app ${target})
endfunction()