diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-07-06 09:18:22 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-07-06 18:41:32 +0200 |
commit | d754e43721e4f40a8dffa8b69ef883ca383a4a61 (patch) | |
tree | 26939d4f7285a4e4a20f508b23ebef3dbd2fa16b /src/plugins | |
parent | a6acb2453f4f6010283426e0c099145c22292146 (diff) |
Make WrapOpenSSLHeaders an optional dependency of the OpenSSL plugin
When configuring Qt statically with OpenSSL support on macOS,
configuring a user project would fail, because WrapOpenSSLHeaders could
not be found.
Configuration fails, because we don't record OPENSSL_ROOT_DIR anywhere,
and WrapOpenSSLHeaders is a required dependency of the OpenSSL plugin.
Make the WrapOpenSSLHeaders dependency optional like WrapVulkanHeaders
for QtGui.
Note that when Qt is statically configured with -openssl-linked on
macOS, configuration of user projects will still fail like described
above.
Pick-to: 6.4
Fixes: QTBUG-96283
Change-Id: I0893e18767387ea849c7e5661f5421b71e3f64ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/tls/openssl/CMakeLists.txt | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/tls/openssl/CMakeLists.txt b/src/plugins/tls/openssl/CMakeLists.txt index a7fb54f08c..489aa32ef6 100644 --- a/src/plugins/tls/openssl/CMakeLists.txt +++ b/src/plugins/tls/openssl/CMakeLists.txt @@ -48,12 +48,10 @@ qt_internal_extend_target(QTlsBackendOpenSSLPlugin CONDITION WIN32 crypt32 ) -qt_internal_extend_target(QTlsBackendOpenSSLPlugin CONDITION QT_FEATURE_openssl_linked - LIBRARIES - WrapOpenSSL::WrapOpenSSL -) - -qt_internal_extend_target(QTlsBackendOpenSSLPlugin CONDITION NOT QT_FEATURE_openssl_linked - LIBRARIES +if(QT_FEATURE_openssl_linked) + target_link_libraries(QTlsBackendOpenSSLPlugin PRIVATE WrapOpenSSL::WrapOpenSSL) +else() + qt_internal_add_target_include_dirs_and_optionally_propagate(QTlsBackendOpenSSLPlugin WrapOpenSSLHeaders::WrapOpenSSLHeaders -) + ) +endif() |