浏览代码

fix order include_directories for OpenSSL + message

The include_directories directuve for OpenSSL was placed before the
find_package(OpenSSL) which was not logical.
Placing it at the correct position + adding a status message printing
the OpenSSL include directory for easier debugging.
kakwa 8 年之前
父节点
当前提交
1f62e5162c
共有 1 个文件被更改,包括 2 次插入1 次删除
  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
 # We need to link OpenSSL if not dynamically loading
 if (CIVETWEB_ENABLE_SSL)
 if (CIVETWEB_ENABLE_SSL)
-  include_directories(${OPENSSL_INCLUDE_DIR})
   if (CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING)
   if (CIVETWEB_ENABLE_SSL_DYNAMIC_LOADING)
     find_package(LibDl)
     find_package(LibDl)
     if (LIBDL_FOUND)
     if (LIBDL_FOUND)
@@ -48,6 +47,8 @@ if (CIVETWEB_ENABLE_SSL)
     endif()
     endif()
   else()
   else()
     find_package(OpenSSL)
     find_package(OpenSSL)
+    include_directories(${OPENSSL_INCLUDE_DIR})
+    message(STATUS "OpenSSL include directory: ${OPENSSL_INCLUDE_DIR}")
     target_link_libraries(c-library ${OPENSSL_LIBRARIES})
     target_link_libraries(c-library ${OPENSSL_LIBRARIES})
   endif()
   endif()
 endif()
 endif()