diff options
author | Artem Dyomin <artem.dyomin@qt.io> | 2023-08-24 15:24:26 +0200 |
---|---|---|
committer | Artem Dyomin <artem.dyomin@qt.io> | 2023-08-30 10:11:08 +0200 |
commit | 00952848c0912a4f38ee6fced3e5aa12f8564aa1 (patch) | |
tree | f0f6404113285d8b604ce8e3762309daee9e0afc /cmake | |
parent | 4b2556daf9632be34c40b0c68fe4d119fa24d356 (diff) |
Implement dynamic symbols resolve for openssl in ffmpeg
We should ship the networking QtMM functionality to Linux users.
Having openssl as a dependency is a bad idea since users might not
have openssl.
The patch implements dynamic symbols loading and resolving on QtMM
initialization.
We might reuse the approach to address other linking dependencies.
Pick-to: 6.6 6.5
Change-Id: I0b21e44a66ebf892fb03f93844549e0877443481
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindFFmpeg.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake index ead6f7690..8a1d8d713 100644 --- a/cmake/FindFFmpeg.cmake +++ b/cmake/FindFFmpeg.cmake @@ -196,7 +196,13 @@ function(__ffmpeg_internal_set_dependencies lib) foreach(dependency ${deps_no_suffix}) string(REGEX REPLACE ${prefix_l} "" dependency ${dependency}) if(NOT ${lib} STREQUAL ${dependency}) - target_link_libraries(FFmpeg::${lib} INTERFACE ${dependency}) + # Apply dynamic symbols resolve for Linux build only. We might add Android and QNX as well. + if(LINUX AND (${dependency} STREQUAL "ssl" OR ${dependency} STREQUAL "crypto")) + # TODO: implement OpenSsl headers check (or reuse WrapOpenSSLHeaders_FOUND) + set(DYNAMIC_RESOLVE_OPENSSL_SYMBOLS TRUE CACHE INTERNAL "") + else() + target_link_libraries(FFmpeg::${lib} INTERFACE ${dependency}) + endif() endif() endforeach() |