Skip to content

Commit 0998358

Browse files
authored
allows cmake to force crypto linkage. (#4383)
1 parent ae78fe9 commit 0998358

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ option(COVERAGE "Enable profiling collection for code coverage calculation" OFF)
3636
option(S2N_INTEG_TESTS "Enable the integrationv2 tests" OFF)
3737
option(S2N_FAST_INTEG_TESTS "Enable the integrationv2 with more parallelism, only has effect if S2N_INTEG_TESTS=ON" ON)
3838
option(S2N_INSTALL_S2NC_S2ND "Install the binaries s2nc and s2nd" OFF)
39+
option(S2N_USE_CRYPTO_SHARED_LIBS "For S2N to use shared libs in Findcrypto" OFF)
3940
option(TSAN "Enable ThreadSanitizer to test thread safety" OFF)
4041
option(ASAN "Enable AddressSanitizer to test memory safety" OFF)
4142

cmake/modules/Findcrypto.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ else()
5656
)
5757

5858
if (NOT crypto_LIBRARY)
59-
if (BUILD_SHARED_LIBS)
59+
if (BUILD_SHARED_LIBS OR S2N_USE_CRYPTO_SHARED_LIBS)
6060
if (crypto_SHARED_LIBRARY)
6161
set(crypto_LIBRARY ${crypto_SHARED_LIBRARY})
6262
else()

0 commit comments

Comments
 (0)