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