diff options
author | Viktor Szakats <commit@vsz.me> | 2023-11-04 02:37:34 +0000 |
---|---|---|
committer | Viktor Szakats <commit@vsz.me> | 2023-11-04 02:40:53 +0000 |
commit | 2c5abde778053272fdc0c5692691309e8f1e79b1 (patch) | |
tree | fd9260ac50664af092f8433deb209a948ad7881d | |
parent | e454895d0543153709cd763d80f472c1d25ca73c (diff) | |
download | portable-2c5abde778053272fdc0c5692691309e8f1e79b1.tar.gz portable-2c5abde778053272fdc0c5692691309e8f1e79b1.tar.bz2 portable-2c5abde778053272fdc0c5692691309e8f1e79b1.zip |
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.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | 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}) | |||
408 | # libraries for regression test | 408 | # libraries for regression test |
409 | if(BUILD_SHARED_LIBS) | 409 | if(BUILD_SHARED_LIBS) |
410 | set(OPENSSL_TEST_LIBS ssl-static crypto-static ${PLATFORM_LIBS}) | 410 | set(OPENSSL_TEST_LIBS ssl-static crypto-static ${PLATFORM_LIBS}) |
411 | set(LIBTLS_TEST_LIBS tls-static ${PLATFORM_LIBS}) | 411 | set(LIBTLS_TEST_LIBS tls-static ${OPENSSL_TEST_LIBS}) |
412 | else() | 412 | else() |
413 | set(OPENSSL_TEST_LIBS ssl crypto ${PLATFORM_LIBS}) | 413 | set(OPENSSL_TEST_LIBS ssl crypto ${PLATFORM_LIBS}) |
414 | set(LIBTLS_TEST_LIBS tls ${PLATFORM_LIBS}) | 414 | 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) | |||
101 | 101 | ||
102 | # build static library for regression test | 102 | # build static library for regression test |
103 | if(BUILD_SHARED_LIBS) | 103 | if(BUILD_SHARED_LIBS) |
104 | add_library(tls-static STATIC $<TARGET_OBJECTS:tls_obj> | 104 | add_library(tls-static STATIC $<TARGET_OBJECTS:tls_obj>) |
105 | $<TARGET_OBJECTS:ssl_obj> $<TARGET_OBJECTS:crypto_obj>) | 105 | target_link_libraries(tls-static ${OPENSSL_TEST_LIBS}) |
106 | target_link_libraries(tls-static ${PLATFORM_LIBS}) | ||
107 | endif() | 106 | endif() |
108 | 107 | ||