Update CMakeLists.txt - play with openssl
[novacoin.git] / 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)