aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Szakats <commit@vsz.me>2023-11-04 01:24:23 +0000
committerViktor Szakats <commit@vsz.me>2023-11-04 01:29:25 +0000
commitd193f43f8b90cbed65ffeec93543d8a3d17bdedc (patch)
tree2cc60ba8e9368b4c682964dd1455571ee976e8cc
parente454895d0543153709cd763d80f472c1d25ca73c (diff)
downloadportable-d193f43f8b90cbed65ffeec93543d8a3d17bdedc.tar.gz
portable-d193f43f8b90cbed65ffeec93543d8a3d17bdedc.tar.bz2
portable-d193f43f8b90cbed65ffeec93543d8a3d17bdedc.zip
slim down `libtls`
By dropping copies of `libcrypto` and `libssl` lib objects from it. This brings back its size to the normal ~100KB from ~4MB. autotools already worked like this.
-rw-r--r--tls/CMakeLists.txt5
1 files changed, 2 insertions, 3 deletions
diff --git a/tls/CMakeLists.txt b/tls/CMakeLists.txt
index 4beef36..240dbf8 100644
--- a/tls/CMakeLists.txt
+++ b/tls/CMakeLists.txt
@@ -50,11 +50,10 @@ target_include_directories(tls_obj
50 ../include 50 ../include
51 ${CMAKE_BINARY_DIR}/include) 51 ${CMAKE_BINARY_DIR}/include)
52 52
53add_library(tls $<TARGET_OBJECTS:tls_obj> $<TARGET_OBJECTS:ssl_obj> 53add_library(tls $<TARGET_OBJECTS:tls_obj> empty.c)
54 $<TARGET_OBJECTS:crypto_obj> empty.c)
55 54
56export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym) 55export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym)
57target_link_libraries(tls ${PLATFORM_LIBS}) 56target_link_libraries(tls ${OPENSSL_LIBS})
58if (WIN32) 57if (WIN32)
59 set(TLS_POSTFIX -${TLS_MAJOR_VERSION} PARENT_SCOPE) 58 set(TLS_POSTFIX -${TLS_MAJOR_VERSION} PARENT_SCOPE)
60endif() 59endif()