mirror of
https://github.com/zhaojh329/rtty.git
synced 2026-02-27 09:53:17 +08:00
src/CMakeLists.txt: fix static build with openssl
As usual, cmake is unable to correctly handle static dependencies by its own and as a result a static build with openssl will fail on: /home/naourr/work/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libcrypto.a(c_zlib.o): in function `zlib_stateful_expand_block': /home/naourr/work/instance-0/output-1/build/libopenssl-1.1.1d/crypto/comp/c_zlib.c:201: undefined reference to `inflate' To fix this, use pkg-config to retrieve openssl dependencies such as -lz or -latomic and fallback on existing mechanism Fixes: - http://autobuild.buildroot.org/results/6105b69d8598f0033044a26f53a768e2d4b2915e Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
+5
-1
@@ -29,7 +29,11 @@ set(RTTY_HAVE_MBEDTLS_CONFIG 0)
|
||||
if(NOT RTTY_SSL_SUPPORT)
|
||||
set(RTTY_SSL_SUPPORT_CONFIG 0)
|
||||
else()
|
||||
find_package(OpenSSL)
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(OPENSSL QUIET openssl)
|
||||
if (NOT OPENSSL_FOUND)
|
||||
find_package(OpenSSL)
|
||||
endif()
|
||||
find_package(WolfSSL)
|
||||
find_package(MbedTLS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user