gcontini
2019-12-01 d02fce46e19f1a7b77a952210974a875c493593f
CMakeLists.txt
@@ -52,17 +52,25 @@
   add_definitions("/D _CRT_SECURE_NO_WARNINGS")
else(MSVC)
    if(MINGW)
        list(APPEND EXTERNAL_LIBS "-lcrypt32 -lws2_32 -liphlpapi")
        list(APPEND EXTERNAL_LIBS "-lcrypt32 -lbcrypt -lws2_32 -liphlpapi")
        SET(CMAKE_EXE_LINKER_FLAGS "-static")
    endif(MINGW)
endif(MSVC)
if(UNIX) #this is true for all the linux systems but not for cross compiling "linux->windows"
   #find a static version of openssl crypto library
   SET ( OPENSSL_USE_STATIC_LIBS ON )
   find_package(OpenSSL REQUIRED COMPONENTS Crypto)
SET ( OPENSSL_USE_STATIC_LIBS ON )
find_package(OpenSSL COMPONENTS Crypto)
IF(OPENSSL_FOUND)
   add_definitions(-DHAS_OPENSSL)
   include_directories(${OPENSSL_INCLUDE_DIR})
   MESSAGE(STATUS "Found openssl version ${OPENSSL_VERSION} ")
   MESSAGE(STATUS "Found openssl version ${OPENSSL_VERSION}")
ELSE(OPENSSL_FOUND)
   MESSAGE(STATUS "OpenSSL not found")
ENDIF(OPENSSL_FOUND)
if(UNIX) #this is true for all the linux systems but not for cross compiling "linux->windows"
   IF(NOT OPENSSL_FOUND)
      MESSAGE(SEND_ERROR "Openssl required in Linux, please install it or specify -DOPENSSL_ROOT")
   ENDIF(NOT OPENSSL_FOUND)
   
    find_package(Threads)
   if(THREADS_HAVE_PTHREAD_ARG)