diff options
author | Viktor Szakats <commit@vsz.me> | 2023-11-04 01:24:23 +0000 |
---|---|---|
committer | Viktor Szakats <commit@vsz.me> | 2023-11-04 01:29:25 +0000 |
commit | d193f43f8b90cbed65ffeec93543d8a3d17bdedc (patch) | |
tree | 2cc60ba8e9368b4c682964dd1455571ee976e8cc | |
parent | e454895d0543153709cd763d80f472c1d25ca73c (diff) | |
download | portable-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.txt | 5 |
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 | ||
53 | add_library(tls $<TARGET_OBJECTS:tls_obj> $<TARGET_OBJECTS:ssl_obj> | 53 | add_library(tls $<TARGET_OBJECTS:tls_obj> empty.c) |
54 | $<TARGET_OBJECTS:crypto_obj> empty.c) | ||
55 | 54 | ||
56 | export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym) | 55 | export_symbol(tls ${CMAKE_CURRENT_BINARY_DIR}/tls.sym) |
57 | target_link_libraries(tls ${PLATFORM_LIBS}) | 56 | target_link_libraries(tls ${OPENSSL_LIBS}) |
58 | if (WIN32) | 57 | if (WIN32) |
59 | set(TLS_POSTFIX -${TLS_MAJOR_VERSION} PARENT_SCOPE) | 58 | set(TLS_POSTFIX -${TLS_MAJOR_VERSION} PARENT_SCOPE) |
60 | endif() | 59 | endif() |