From 04b3af3e7bd0ca3fe9c33bae20623c2ef2e41e07 Mon Sep 17 00:00:00 2001 From: svost Date: Sun, 31 Mar 2024 00:00:48 +0300 Subject: [PATCH] Update CMakeLists.txt - play with openssl --- CMakeLists.txt | 5 +++++ src/CMakeLists.txt | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e82bad..1ae1f80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,8 +55,13 @@ if(WIN32) set(Boost_USE_STATIC_RUNTIME ON) endif() find_package(Boost REQUIRED COMPONENTS atomic chrono filesystem program_options system thread) + set(OPENSSL_USE_STATIC_LIBS ON) +find_package(OpenSSL) +if (NOT OpenSSL_FOUND) +set(OPENSSL_USE_STATIC_LIBS OFF) find_package(OpenSSL REQUIRED) +endif() # Disable compiling qrencode executables option(WITH_TOOLS "Build utility tools" NO) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6d2cb9c..eccdd59 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,8 +43,14 @@ if(WIN32) set(Boost_USE_STATIC_RUNTIME ON) endif() find_package(Boost REQUIRED COMPONENTS atomic chrono filesystem program_options system thread) + set(OPENSSL_USE_STATIC_LIBS ON) +find_package(OpenSSL) +if (NOT OpenSSL_FOUND) +set(OPENSSL_USE_STATIC_LIBS OFF) find_package(OpenSSL REQUIRED) +endif() + add_subdirectory(additional/IXWebSocket) # Set default root path for berkeley db -- 1.7.1