From 2c5abde778053272fdc0c5692691309e8f1e79b1 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 4 Nov 2023 02:37:34 +0000 Subject: slim `tls-static` library (used in tests) Instead of including a full copy of libcrypto and libssl in libtls-static, link existing libcrytpo-static and libssl-static to the test targets. This wasn't causing any issue, just unnecessarily duplicating a lot of objects. --- CMakeLists.txt | 2 +- tls/CMakeLists.txt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f0dfa0..094d649 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -408,7 +408,7 @@ set(LIBTLS_LIBS tls ${PLATFORM_LIBS}) # libraries for regression test if(BUILD_SHARED_LIBS) set(OPENSSL_TEST_LIBS ssl-static crypto-static ${PLATFORM_LIBS}) - set(LIBTLS_TEST_LIBS tls-static ${PLATFORM_LIBS}) + set(LIBTLS_TEST_LIBS tls-static ${OPENSSL_TEST_LIBS}) else() set(OPENSSL_TEST_LIBS ssl crypto ${PLATFORM_LIBS}) set(LIBTLS_TEST_LIBS tls ${PLATFORM_LIBS}) diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt index 4beef36..442a57a 100644 --- a/tls/CMakeLists.txt +++ b/tls/CMakeLists.txt @@ -101,8 +101,7 @@ endif(ENABLE_LIBRESSL_INSTALL) # build static library for regression test if(BUILD_SHARED_LIBS) - add_library(tls-static STATIC $ - $ $) - target_link_libraries(tls-static ${PLATFORM_LIBS}) + add_library(tls-static STATIC $) + target_link_libraries(tls-static ${OPENSSL_TEST_LIBS}) endif() -- cgit v1.2.3-55-g6feb