diff options
author | Kai Köhne <kai.koehne@qt.io> | 2023-11-15 16:23:22 +0100 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2023-11-22 18:16:30 +0100 |
commit | afa75142d118d750bd13d02c104140ff77cb9339 (patch) | |
tree | e83bb3b593b1cd5c56bf63416f3595bab09df44a | |
parent | 35ae0f9def6fc197f7551ff7cb084eaa87367471 (diff) |
MapViewer: Fix use of ssl on Android
Without OpenSSL, MapViewer will show
The active map type requires (missing) SSL support
Follow the advise from
https://doc.qt.io/qt-6/android-openssl-support.html
to fetch OpenSSL libraries from github.
Pick-to: 6.5 6.6
Change-Id: Ie50f9fcb7adfeb02e23018a360f758faea116c5b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
-rw-r--r-- | examples/location/mapviewer/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/location/mapviewer/CMakeLists.txt b/examples/location/mapviewer/CMakeLists.txt index 92f1615d..bf461f63 100644 --- a/examples/location/mapviewer/CMakeLists.txt +++ b/examples/location/mapviewer/CMakeLists.txt @@ -71,6 +71,20 @@ if(QT_FEATURE_geoservices_maplibregl) ) endif() +if (ANDROID) + # Download & link to OpenSSL libs + include(FetchContent) + FetchContent_Declare( + android_openssl + DOWNLOAD_EXTRACT_TIMESTAMP true + URL https://github.com/KDAB/android_openssl/archive/refs/heads/master.zip + ) + FetchContent_MakeAvailable(android_openssl) + + include(${android_openssl_SOURCE_DIR}/android_openssl.cmake) + add_android_openssl_libraries(qml_location_mapviewer) +endif() + install(TARGETS qml_location_mapviewer RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" |