CMake: add CMAKE_FIND_ROOT_PATH as extraPrefixDirs for androiddeployqt

androiddeployqt has extraPrefixDirs to provide extra prefix paths in
addition to the main Qt install path, however, for some reason, it was
not being used.

With this, apps for Android using Conan can pass the Conan build prefix
for androiddeployqt to use it as well.

Task-number: QTBUG-88519
Change-Id: Iad73055ac6c03e3ffe86fca271dbda67ac29a275
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 00e726ce12431e8c3db8bc9deb8952f930a5a672)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Assam Boudjelthia 2020-11-18 14:39:18 +02:00 committed by Qt Cherry-pick Bot
parent eaedd7efbf
commit aaed8f283c

View File

@ -198,6 +198,17 @@ endif()
string(APPEND file_contents
" \"rcc-binary\" : \"${rcc_binary_path_native}\",\n")
# Extra prefix paths
foreach(prefix IN LISTS CMAKE_FIND_ROOT_PATH)
if (NOT "${prefix}" STREQUAL "${qt_android_install_dir_native}"
AND NOT "${prefix}" STREQUAL "${android_ndk_root_native}")
list(APPEND extra_prefix_list \"${prefix}\")
endif()
endforeach()
string (REPLACE ";" "," extra_prefix_list "${extra_prefix_list}")
string(APPEND file_contents
" \"extraPrefixDirs\" : [ ${extra_prefix_list} ],\n")
# Last item in json file
# base location of stdlibc++, will be suffixed by androiddeploy qt