Browse Source

Merge pull request #408 from kakwa/FIX_ORDER_INCLUDE_DIR_OPENSSL

fix order include_directories for OpenSSL + message
bel2125 8 years ago
parent
commit
96f0041949
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/CMakeLists.txt

+ 2 - 1
src/CMakeLists.txt

@@ -40,7 +40,6 @@ endif()
 
 # We need to link OpenSSL if not dynamically loading
 if (CIVETWEB_ENABLE_SSL)
-  include_directories(${OPENSSL_INCLUDE_DIR})
   if (CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING)
     find_package(LibDl)
     if (LIBDL_FOUND)
@@ -48,6 +47,8 @@ if (CIVETWEB_ENABLE_SSL)
     endif()
   else()
     find_package(OpenSSL)
+    include_directories(${OPENSSL_INCLUDE_DIR})
+    message(STATUS "OpenSSL include directory: ${OPENSSL_INCLUDE_DIR}")
     target_link_libraries(c-library ${OPENSSL_LIBRARIES})
   endif()
 endif()