Update CMakeLists.txt - play with openssl master
authorsvost <ya.nowa@yandex.ru>
Sat, 30 Mar 2024 21:00:48 +0000 (00:00 +0300)
committersvost <ya.nowa@yandex.ru>
Sat, 30 Mar 2024 21:00:48 +0000 (00:00 +0300)
CMakeLists.txt
src/CMakeLists.txt

index 5e82bad..1ae1f80 100644 (file)
@@ -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)
index 6d2cb9c..eccdd59 100644 (file)
@@ -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