summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kde.org>2020-01-06 16:06:35 +0200
committerBogDan Vatra <bogdan@kde.org>2020-01-07 14:23:06 +0200
commite52239f525d59f965dbbc5dbe2c28314498690b0 (patch)
treebce812aa0b71e1f225fb2b69c533f7649d7ce687 /src
parent9d7ed92f6e63cd2d1a1388874e54b37b5cfd01b7 (diff)
Use prefixed ssl libs when "-openssl-linked" configure params is used
As long as we do a multi abi build in one go there is no easy way for us to know where the ssl libs are located for each ABI. The easiest way is to use libs prefixed with the ABI. For configure set we are using "_arm64-v8a" prefix as the configure script will always use arm64-v8a to run the tests. Don't show the OPENSSL_LIBS example as it won't work on Android. Here https://github.com/KDAB/android_openssl/commit/ebb0b68be4 you can find a script which builds these libs. Fixes: QTBUG-80862 Change-Id: I019c2a208ae48a7356b8f3933d0f4aad5ac156a3 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/network/configure.json6
-rw-r--r--src/network/ssl/ssl.pri8
2 files changed, 10 insertions, 4 deletions
diff --git a/src/network/configure.json b/src/network/configure.json
index f501465c91..ddf8f4c709 100644
--- a/src/network/configure.json
+++ b/src/network/configure.json
@@ -94,6 +94,10 @@
"condition": "config.msvc"
},
{
+ "libs": "-lssl_arm64-v8a -lcrypto_arm64-v8a",
+ "condition": "config.android"
+ },
+ {
"libs": "-lssl -lcrypto",
"condition": "!config.msvc"
}
@@ -445,7 +449,7 @@
"report": [
{
"type": "note",
- "condition": "features.openssl-linked && libs.openssl.source != 0
+ "condition": "!config.android && features.openssl-linked && libs.openssl.source != 0
&& input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''",
"message": "When linking against OpenSSL, you can override the default
library names through OPENSSL_LIBS.
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
index 8bb70a2aed..a9b7197aca 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -125,9 +125,11 @@ qtConfig(ssl) {
# - libs in <OPENSSL_DIR>\lib\VC\static
# - configure: -openssl -openssl-linked -I <OPENSSL_DIR>\include -L <OPENSSL_DIR>\lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD"
- qtConfig(openssl-linked): \
- QMAKE_USE_FOR_PRIVATE += openssl
- else: \
+ qtConfig(openssl-linked): {
+ android {
+ build_pass: LIBS_PRIVATE += -lssl_$${QT_ARCH} -lcrypto_$${QT_ARCH}
+ } else: QMAKE_USE_FOR_PRIVATE += openssl
+ } else: \
QMAKE_USE_FOR_PRIVATE += openssl/nolink
win32 {
LIBS_PRIVATE += -lcrypt32