diff options
| author | Alexandru Croitor <alexandru.croitor@qt.io> | 2024-03-15 17:31:47 +0100 |
|---|---|---|
| committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2024-03-15 22:42:30 +0100 |
| commit | bcdc9d7059b6ecd4e0bfb44cf5a42d87c49e3edc (patch) | |
| tree | 60a50b43b1bfd23d3ccf2bae25408968ada9ede4 /src/corelib/Qt6CoreMacros.cmake | |
| parent | 7a84c58f55ab56c5d77be80e43783d0b5302a749 (diff) | |
CMake: Check for qtpaths6.exe existence during windows deployment
A qt installation might not contain the non-versioned the qtpaths.exe
installed, but keep the versioned qtpaths6.exe.
Try to use the versioned version before the non-versioned one.
If none exists, show a warning at deployment time.
Amends 571201603acc731330c9af42a3aca9cda41d38fd
Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-122664
Task-number: QTBUG-119619
Change-Id: I23caf9ed3c7928fbab9657b0c0c64517dfc7d68e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/Qt6CoreMacros.cmake')
| -rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 07289156a3a..c227cfcf83a 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -3039,7 +3039,30 @@ function(_qt_internal_setup_deploy_support) else() set(qt_paths_ext "") endif() - set(target_qtpaths_path "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_BINS}/qtpaths${qt_paths_ext}") + + + + set(target_qtpaths_path "") + set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_BINS}") + get_property(qt_major_version TARGET "${target}" PROPERTY INTERFACE_QT_MAJOR_VERSION) + if(qt_major_version) + set(target_qtpaths_with_major_version_path + "${qtpaths_prefix}/qtpaths${qt_major_version}${qt_paths_ext}") + if(EXISTS "${target_qtpaths_with_major_version_path}") + set(target_qtpaths_path "${target_qtpaths_with_major_version_path}") + endif() + endif() + + if(NOT target_qtpaths_path) + set(target_qtpaths_path_without_version "${qtpaths_prefix}/qtpaths${qt_paths_ext}") + if(EXISTS "${target_qtpaths_path_without_version}") + set(target_qtpaths_path "${target_qtpaths_path_without_version}") + endif() + endif() + + if(NOT target_qtpaths_path) + message(DEBUG "No qtpaths executable found for deployment purposes.") + endif() file(GENERATE OUTPUT "${QT_DEPLOY_SUPPORT}" CONTENT "cmake_minimum_required(VERSION 3.16...3.21) |
