summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorArtem Dyomin <artem.dyomin@qt.io>2023-08-24 15:24:26 +0200
committerArtem Dyomin <artem.dyomin@qt.io>2023-08-30 10:11:08 +0200
commit00952848c0912a4f38ee6fced3e5aa12f8564aa1 (patch)
treef0f6404113285d8b604ce8e3762309daee9e0afc /cmake
parent4b2556daf9632be34c40b0c68fe4d119fa24d356 (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.cmake8
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()