+15
-1
lines changedFilter options
+15
-1
lines changed Original file line number Diff line number Diff line change
@@ -148,6 +148,7 @@ option(ENABLE_CODE_COVERAGE "Enable code coverage reporting" OFF)
148
148
option(ENABLE_MONOTONIC_CLOCK "Enforced clock_gettime with monotonic clock on GC CV" ${ENABLE_MONOTONIC_CLOCK_DEFAULT})
149
149
option(ENABLE_STDCXX_SYNC "Use C++11 chrono and threads for timing instead of pthreads" ${ENABLE_STDCXX_SYNC_DEFAULT})
150
150
option(USE_OPENSSL_PC "Use pkg-config to find OpenSSL libraries" ON)
151
+
option(OPENSSL_USE_STATIC_LIBS "Link OpenSSL libraries statically." OFF)
151
152
option(USE_BUSY_WAITING "Enable more accurate sending times at a cost of potentially higher CPU load" OFF)
152
153
option(USE_GNUSTL "Get c++ library/headers from the gnustl.pc" OFF)
153
154
option(ENABLE_SOCK_CLOEXEC "Enable setting SOCK_CLOEXEC on a socket" ON)
@@ -345,6 +346,10 @@ if (ENABLE_ENCRYPTION)
345
346
# fall back to find_package method otherwise
346
347
if (USE_OPENSSL_PC)
347
348
pkg_check_modules(SSL ${SSL_REQUIRED_MODULES})
349
+
if (OPENSSL_USE_STATIC_LIBS)
350
+
# use `pkg-config --static xxx` found libs
351
+
set(SSL_LIBRARIES ${SSL_STATIC_LIBRARIES})
352
+
endif()
348
353
endif()
349
354
if (SSL_FOUND)
350
355
# We have some cases when pkg-config is improperly configured
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ set cmake_options {
57
57
enable-thread-check "Enable #include <threadcheck.h> that implements THREAD_* macros"
58
58
enable-stdc++-sync "Use standard C++11 chrono/threads instead of pthread wrapper (default: OFF, on Windows: ON)"
59
59
use-openssl-pc "Use pkg-config to find OpenSSL libraries (default: ON)"
60
+
openssl-use-static-libs "Link OpenSSL statically (default: OFF)."
60
61
use-busy-waiting "Enable more accurate sending times at a cost of potentially higher CPU load (default: OFF)"
61
62
use-gnustl "Get c++ library/headers from the gnustl.pc"
62
63
enable-sock-cloexec "Enable setting SOCK_CLOEXEC on a socket (default: ON)"
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ Option details are given further below.
61
61
| [`USE_ENCLIB`](#use_enclib) | 1.3.3 | `STRING` | openssl | Encryption library to be used (`openssl`, `gnutls`, `mbedtls`). |
62
62
| [`USE_GNUSTL`](#use_gnustl) | 1.3.4 | `BOOL` | OFF | Use `pkg-config` with the `gnustl` package name to extract the header and library path for the C++ standard library. |
63
63
| [`USE_OPENSSL_PC`](#use_openssl_pc) | 1.3.0 | `BOOL` | ON | Use `pkg-config` to find OpenSSL libraries. |
64
+
| [`OPENSSL_USE_STATIC_LIBS`](#openssl_use_static_libs) | 1.5.0 | `BOOL` | OFF | Link OpenSSL statically. |
64
65
| [`USE_STATIC_LIBSTDCXX`](#use_static_libstdcxx) | 1.2.0 | `BOOL` | OFF | Enforces linking the SRT library against the static libstdc++ library. |
65
66
| [`WITH_COMPILER_PREFIX`](#with_compiler_prefix) | 1.3.0 | `STRING` | OFF | Sets C/C++ toolchains as `<prefix><c-compiler>` and `<prefix><c++-compiler>`, overriding the default compiler. |
66
67
| [`WITH_COMPILER_TYPE`](#with_compiler_type) | 1.3.0 | `STRING` | OFF | Sets the compiler type to be used (values: gcc, cc, clang, etc.). |
@@ -551,6 +552,12 @@ built-in one).
551
552
When ON, uses `pkg-config` to find OpenSSL libraries. You can turn this OFF to
552
553
force `cmake` to find OpenSSL by its own preferred method.
553
554
555
+
### OPENSSL_USE_STATIC_LIBS
556
+
**`--openssl-use-static-libs`** (default: OFF)
557
+
558
+
When ON, OpenSSL libraries are linked statically.
559
+
When `pkg-config`(`-DUSE_OPENSSL_PC=ON`) is used, static OpenSSL libraries are listed in `SSL_STATIC_LIBRARIES`. See `<prefix>_STATIC` in [CMake's FindPkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html).
560
+
On Windows additionally links `crypt32.lib`.
554
561
555
562
#### USE_STATIC_LIBSTDCXX
556
563
**`--use-static-libstdc++`** (default: OFF)
Original file line number Diff line number Diff line change
@@ -165,6 +165,7 @@ function(ShowProjectConfig)
165
165
" ENABLE_MONOTONIC_CLOCK: ${ENABLE_MONOTONIC_CLOCK}\n"
166
166
" ENABLE_STDCXX_SYNC: ${ENABLE_STDCXX_SYNC}\n"
167
167
" USE_OPENSSL_PC: ${USE_OPENSSL_PC}\n"
168
+
" OPENSSL_USE_STATIC_LIBS: ${OPENSSL_USE_STATIC_LIBS}\n"
168
169
" USE_BUSY_WAITING: ${USE_BUSY_WAITING}\n"
169
170
" USE_GNUSTL: ${USE_GNUSTL}\n"
170
171
" ENABLE_SOCK_CLOEXEC: ${ENABLE_SOCK_CLOEXEC}\n"
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ done
17
17
18
18
cd $SRC_DIR
19
19
./configure --use-enclib=$ENC_LIB \
20
-
--use-openssl-pc=OFF --OPENSSL_USE_STATIC_LIBS=TRUE \
20
+
--use-openssl-pc=OFF \
21
21
--OPENSSL_INCLUDE_DIR=$INSTALL_DIR/include \
22
22
--OPENSSL_CRYPTO_LIBRARY=$INSTALL_DIR/lib/libcrypto.a --OPENSSL_SSL_LIBRARY=$INSTALL_DIR/lib/libssl.a \
23
23
--STATIC_MBEDTLS=FALSE \
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4