CMake: always pass QT6_INSTALL_PREFIX to androiddeployqt
Qt CMake uses a fake_prefix as install dir when running tests instead of the main qt install path, this will throw androiddeployqt off since it expects the real qt install path which has gradle and java sources. Fixes: QTBUG-88579 Change-Id: I6580470840ae14d4a4a68a95f217b30408d7ab44 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 0d42f4df9275897d708ee01ed879ac185aab7360) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
0415dca628
commit
ab9032acbb
@ -45,7 +45,7 @@ function(qt6_android_generate_deployment_settings target)
|
|||||||
string(APPEND file_contents
|
string(APPEND file_contents
|
||||||
" \"description\": \"This file is generated by cmake to be read by androiddeployqt and should not be modified by hand.\",\n")
|
" \"description\": \"This file is generated by cmake to be read by androiddeployqt and should not be modified by hand.\",\n")
|
||||||
|
|
||||||
# Host Qt Android install path
|
# Host Qt Android install path
|
||||||
if (NOT QT_BUILDING_QT OR QT_STANDALONE_TEST_PATH)
|
if (NOT QT_BUILDING_QT OR QT_STANDALONE_TEST_PATH)
|
||||||
set(qt_path "${QT6_INSTALL_PREFIX}")
|
set(qt_path "${QT6_INSTALL_PREFIX}")
|
||||||
set(android_plugin_dir_path "${qt_path}/${QT6_INSTALL_PLUGINS}/platforms")
|
set(android_plugin_dir_path "${qt_path}/${QT6_INSTALL_PLUGINS}/platforms")
|
||||||
@ -62,12 +62,9 @@ function(qt6_android_generate_deployment_settings target)
|
|||||||
list(GET plugin_dir_files 0 android_platform_plugin_path)
|
list(GET plugin_dir_files 0 android_platform_plugin_path)
|
||||||
message(STATUS "Found android platform plugin at: ${android_platform_plugin_path}")
|
message(STATUS "Found android platform plugin at: ${android_platform_plugin_path}")
|
||||||
endif()
|
endif()
|
||||||
set(qt_android_install_dir "${qt_path}")
|
|
||||||
else()
|
|
||||||
# Building from source, use the same install prefix.
|
|
||||||
set(qt_android_install_dir "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(qt_android_install_dir "${QT6_INSTALL_PREFIX}")
|
||||||
file(TO_CMAKE_PATH "${qt_android_install_dir}" qt_android_install_dir_native)
|
file(TO_CMAKE_PATH "${qt_android_install_dir}" qt_android_install_dir_native)
|
||||||
string(APPEND file_contents
|
string(APPEND file_contents
|
||||||
" \"qt\": \"${qt_android_install_dir_native}\",\n")
|
" \"qt\": \"${qt_android_install_dir_native}\",\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user