]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Set missing dependencies 32779/head
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 15 Nov 2019 14:41:56 +0000 (14:41 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Mon, 31 Aug 2020 12:15:04 +0000 (12:15 +0000)
When building Windows DLLs, all symbols must be resolved. For this
reason, we'll have to make sure that we don't have any unresolved
symbols.

We ended up having some issues with multiple definitions when
doing this for Linux targets, so we'll do this only for Windows
buids for now: http://paste.openstack.org/raw/787049/

We'll avoid having the librbd plugins as a librbd dependency since
this introduces a circular dependency.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
src/compressor/lz4/CMakeLists.txt
src/compressor/snappy/CMakeLists.txt
src/compressor/zlib/CMakeLists.txt
src/compressor/zstd/CMakeLists.txt
src/crypto/openssl/CMakeLists.txt
src/erasure-code/CMakeLists.txt
src/librbd/CMakeLists.txt

index 2341ce5aef7926525246125c0dcdd8e3ba38ceff..ff8e14c298c730ae396835e3f3630c1b8acec29a 100644 (file)
@@ -5,7 +5,8 @@ set(lz4_sources
 )
 
 add_library(ceph_lz4 SHARED ${lz4_sources})
-target_link_libraries(ceph_lz4 PRIVATE LZ4::LZ4 compressor)
+target_link_libraries(ceph_lz4
+  PRIVATE LZ4::LZ4 compressor $<$<PLATFORM_ID:Windows>:ceph-common>)
 set_target_properties(ceph_lz4 PROPERTIES
   VERSION 2.0.0
   SOVERSION 2
index 5396e03f1ead0450594e217242552eb41b2c68e6..d1ba3b2e7466a8535319a89a9f5f9df65e844c38 100644 (file)
@@ -5,7 +5,8 @@ set(snappy_sources
 )
 
 add_library(ceph_snappy SHARED ${snappy_sources})
-target_link_libraries(ceph_snappy PRIVATE snappy::snappy compressor)
+target_link_libraries(ceph_snappy
+  PRIVATE snappy::snappy compressor $<$<PLATFORM_ID:Windows>:ceph-common>)
 set_target_properties(ceph_snappy PROPERTIES
   VERSION 2.0.0
   SOVERSION 2
index c357c326660088b0590449536d88f7e08c08c7ab..c1c8413949c8fadb6cef8c76bed48a590a6e471e 100644 (file)
@@ -49,7 +49,7 @@ else(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE))
 endif(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE))
 
 add_library(ceph_zlib SHARED ${zlib_sources})
-target_link_libraries(ceph_zlib ZLIB::ZLIB compressor)
+target_link_libraries(ceph_zlib ZLIB::ZLIB compressor $<$<PLATFORM_ID:Windows>:ceph-common>)
 target_include_directories(ceph_zlib SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/isa-l/include")
 set_target_properties(ceph_zlib PROPERTIES
   VERSION 2.0.0
index a5ebdaf538109a35ac0a45e0a3b999e6ec1286b4..b53b0d9444824ee13beb8f0444c18b16a4250038 100644 (file)
@@ -28,7 +28,7 @@ set(zstd_sources
 )
 
 add_library(ceph_zstd SHARED ${zstd_sources})
-target_link_libraries(ceph_zstd PRIVATE zstd)
+target_link_libraries(ceph_zstd PRIVATE zstd $<$<PLATFORM_ID:Windows>:ceph-common>)
 set_target_properties(ceph_zstd PROPERTIES
   VERSION 2.0.0
   SOVERSION 2
index 7a63a32e8b3b6c0c9a3bc851642c0067fb5a8253..6ede1567f218da60ff5d0ab0e8d7692acac27097 100644 (file)
@@ -5,7 +5,9 @@ set(openssl_crypto_plugin_srcs
   openssl_crypto_plugin.cc)
 
 add_library(ceph_crypto_openssl SHARED ${openssl_crypto_plugin_srcs})
-target_link_libraries(ceph_crypto_openssl PRIVATE crypto)
+target_link_libraries(ceph_crypto_openssl
+    PRIVATE OpenSSL::Crypto
+    $<$<PLATFORM_ID:Windows>:ceph-common>)
 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 "")
index 9cdc62e7dcbdeb1d2f751830fede3432110454ba..59e7781594893a776aafb1c498c8769a9aea8697 100644 (file)
@@ -28,7 +28,8 @@ if(HAVE_BETTER_YASM_ELF64 OR HAVE_ARMV8_SIMD)
 endif()
 
 add_library(erasure_code STATIC ErasureCodePlugin.cc)
-target_link_libraries(erasure_code ${CMAKE_DL_LIBS})
+target_link_libraries(erasure_code $<$<PLATFORM_ID:Windows>:dlfcn_win32>
+                      ${CMAKE_DL_LIBS})
 
 add_library(erasure_code_objs OBJECT ErasureCode.cc)
 
index 0395040037598652bf832f40e93bfefb16db59f6..b73fa25b7622416aaabb477bb15bbd6976c6306b 100644 (file)
@@ -206,7 +206,7 @@ if(WITH_EVENTTRACE)
   add_dependencies(rbd_internal eventtrace_tp)
 endif()
 target_link_libraries(rbd_internal PRIVATE
-  osdc)
+  osdc rbd_types)
 
 if(WITH_RBD_RWL)
   target_link_libraries(rbd_internal
@@ -222,7 +222,7 @@ set(rbd_plugin_parent_cache_srcs
 add_library(librbd_plugin_parent_cache SHARED
   ${rbd_plugin_parent_cache_srcs})
 target_link_libraries(librbd_plugin_parent_cache PRIVATE
-  ceph_immutable_object_cache_lib
+  ceph_immutable_object_cache_lib ceph-common librbd
   librados)
 set_target_properties(librbd_plugin_parent_cache PROPERTIES
   OUTPUT_NAME ceph_librbd_parent_cache
@@ -236,7 +236,6 @@ add_library(librbd ${CEPH_SHARED}
 if(WITH_LTTNG)
   add_dependencies(librbd librbd-tp)
 endif()
-add_dependencies(librbd librbd_plugins)
 
 target_link_libraries(librbd PRIVATE
   rbd_internal