]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Add missing ssl include 31981/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 4 Oct 2019 10:37:58 +0000 (13:37 +0300)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 19 Feb 2020 08:24:21 +0000 (08:24 +0000)
A few modules are using ssl headers without having the openssl
include dir set by the cmake files.

This change updates the according cmake files.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
src/auth/CMakeLists.txt
src/common/CMakeLists.txt
src/crypto/openssl/CMakeLists.txt
src/msg/CMakeLists.txt

index b6ae0c83efdc0bb9669ce2416ff583134ea80fe7..8e849373a0b6e80dcf530f252c110ea9caf50db2 100644 (file)
@@ -21,3 +21,4 @@ if(HAVE_GSSAPI)
 endif()
 
 add_library(common-auth-objs OBJECT ${auth_srcs})
+target_include_directories(common-auth-objs PRIVATE ${OPENSSL_INCLUDE_DIR})
index 7affa6d5f6b886383c339f806d2a9b9f3f3ee7ab..5e7fb6a78ebe8aa03d8f14a7c82d7e1dfa010b9d 100644 (file)
@@ -126,6 +126,10 @@ endif()
 
 add_library(common-common-objs OBJECT
   ${common_srcs})
+# Let's not rely on the default system headers and point Cmake to the
+# retrieved OpenSSL location. This is especially important when cross
+# compiling (e.g. targeting Windows).
+target_include_directories(common-common-objs PRIVATE ${OPENSSL_INCLUDE_DIR})
 # for options.cc
 target_compile_definitions(common-common-objs PRIVATE
   "CEPH_LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\""
index 2525ed9359baf03880ff86d93ad008f7cd17e812..7a63a32e8b3b6c0c9a3bc851642c0067fb5a8253 100644 (file)
@@ -6,6 +6,7 @@ set(openssl_crypto_plugin_srcs
 
 add_library(ceph_crypto_openssl SHARED ${openssl_crypto_plugin_srcs})
 target_link_libraries(ceph_crypto_openssl PRIVATE crypto)
+target_include_directories(ceph_crypto_openssl PRIVATE ${OPENSSL_INCLUDE_DIR})
 add_dependencies(crypto_plugins ceph_crypto_openssl)
 set_target_properties(ceph_crypto_openssl PROPERTIES INSTALL_RPATH "")
 install(TARGETS ceph_crypto_openssl DESTINATION ${crypto_plugin_dir})
index ce6550a57f6b13656cdc1118ce7aaad1da64ff3c..0c8359657958497ba8b88362e06788242406a25a 100644 (file)
@@ -38,6 +38,7 @@ if(HAVE_RDMA)
 endif()
 
 add_library(common-msg-objs OBJECT ${msg_srcs})
+target_include_directories(common-msg-objs PRIVATE ${OPENSSL_INCLUDE_DIR})
 
 if(WITH_DPDK)
   set(async_dpdk_srcs