use regular configure mechanism for openssl library references
don't attempt to hand-craft a library export any more. instead, use the configure system's built-in mechanism, and refer to it via QMAKE_USE. this also allows us to rely on transitive dependencies in the autotest. as a side effect, this makes the openssl-linked feature imply the openssl one. Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
4f2a571f09
commit
5e2367aaa5
|
|
@ -31,7 +31,6 @@ qtHaveModule(widgets) {
|
|||
}
|
||||
|
||||
qtConfig(openssl): SUBDIRS += securesocketclient
|
||||
qtConfig(openssl-linked): SUBDIRS += securesocketclient
|
||||
qtConfig(sctp): SUBDIRS += multistreamserver multistreamclient
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,13 +46,24 @@
|
|||
"-lproxy"
|
||||
]
|
||||
},
|
||||
"openssl_headers": {
|
||||
"label": "OpenSSL Headers",
|
||||
"export": "openssl",
|
||||
"test": "unix/openssl",
|
||||
"sources": [
|
||||
{
|
||||
"comment": "placeholder for OPENSSL_PATH",
|
||||
"libs": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"openssl": {
|
||||
"label": "OpenSSL Libraries",
|
||||
"export": "",
|
||||
"label": "OpenSSL",
|
||||
"test": "unix/openssl",
|
||||
"sources": [
|
||||
{ "type": "openssl" },
|
||||
{
|
||||
"comment": "placeholder for OPENSSL_LIBS{,_{DEBUG,RELEASE}}",
|
||||
"comment": "placeholder for OPENSSL_{PATH,LIBS{,_{DEBUG,RELEASE}}}",
|
||||
"libs": "",
|
||||
"builds": {
|
||||
"debug": "",
|
||||
|
|
@ -92,11 +103,6 @@
|
|||
"test": "unix/ipv6ifname",
|
||||
"use": "network"
|
||||
},
|
||||
"openssl": {
|
||||
"label": "OpenSSL",
|
||||
"type": "compile",
|
||||
"test": "unix/openssl"
|
||||
},
|
||||
"sctp": {
|
||||
"label": "SCTP support",
|
||||
"type": "compile",
|
||||
|
|
@ -138,7 +144,7 @@
|
|||
"enable": "input.openssl == 'yes' || input.openssl == 'linked' || input.openssl == 'runtime'",
|
||||
"disable": "input.openssl == 'no' || input.ssl == 'no'",
|
||||
"autoDetect": "!config.winrt",
|
||||
"condition": "!features.securetransport && tests.openssl",
|
||||
"condition": "!features.securetransport && (features.openssl-linked || libs.openssl_headers)",
|
||||
"output": [
|
||||
"privateFeature",
|
||||
{ "type": "publicQtConfig", "condition": "!features.openssl-linked" },
|
||||
|
|
@ -149,14 +155,9 @@
|
|||
"label": " Qt directly linked to OpenSSL",
|
||||
"enable": "input.openssl == 'linked'",
|
||||
"disable": "input.openssl != 'linked'",
|
||||
"condition": "features.openssl && libs.openssl",
|
||||
"condition": "!features.securetransport && libs.openssl",
|
||||
"output": [
|
||||
"privateFeature",
|
||||
{ "type": "varAssign", "name": "OPENSSL_LIBS", "value": "libs.openssl.libs", "eval": "true" },
|
||||
{ "type": "varAssign", "name": "OPENSSL_LIBS_DEBUG", "value": "libs.openssl.builds.debug.libs",
|
||||
"eval": "true", "condition": "config.win32" },
|
||||
{ "type": "varAssign", "name": "OPENSSL_LIBS_RELEASE", "value": "libs.openssl.builds.release.libs",
|
||||
"eval": "true", "condition": "config.win32" },
|
||||
{ "type": "define", "name": "QT_LINKED_OPENSSL" }
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ qtConfig(ssl) {
|
|||
ssl/qsslellipticcurve_dummy.cpp
|
||||
}
|
||||
|
||||
qtConfig(openssl)|qtConfig(openssl-linked) {
|
||||
qtConfig(openssl) {
|
||||
HEADERS += ssl/qsslcontext_openssl_p.h \
|
||||
ssl/qsslsocket_openssl_p.h \
|
||||
ssl/qsslsocket_openssl_symbols_p.h
|
||||
|
|
@ -79,16 +79,10 @@ 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"
|
||||
|
||||
include($$OUT_PWD/qtnetwork-config.pri)
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
LIBS_PRIVATE += $$OPENSSL_LIBS_DEBUG
|
||||
} else {
|
||||
LIBS_PRIVATE += $$OPENSSL_LIBS_RELEASE
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += $$OPENSSL_CFLAGS
|
||||
LIBS_PRIVATE += $$OPENSSL_LIBS
|
||||
qtConfig(openssl-linked): \
|
||||
QMAKE_USE_FOR_PRIVATE += openssl
|
||||
else: \
|
||||
QMAKE_USE_FOR_PRIVATE += openssl/nolink
|
||||
win32: LIBS_PRIVATE += -lcrypt32
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,12 +14,6 @@ win32 {
|
|||
}
|
||||
}
|
||||
|
||||
# OpenSSL support
|
||||
qtConfig(openssl)|qtConfig(openssl-linked) {
|
||||
# Add optional SSL libs
|
||||
LIBS += $$OPENSSL_LIBS
|
||||
}
|
||||
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
|
||||
requires(qtConfig(private_tests))
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ dialogs \
|
|||
windowtransparency \
|
||||
unc
|
||||
|
||||
!qtConfig(openssl):!qtConfig(openssl-linked): SUBDIRS -= qssloptions
|
||||
!qtConfig(openssl): SUBDIRS -= qssloptions
|
||||
|
||||
qtConfig(opengl) {
|
||||
SUBDIRS += qopengltextureblitter
|
||||
|
|
|
|||
Loading…
Reference in New Issue