]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
cmake: append rados to THIRDPARTY_LIBS before appending it to LIBS ceph-mimic-v5.8-563-1
authorKefu Chai <tchaikov@gmail.com>
Sun, 15 Apr 2018 20:14:26 +0000 (13:14 -0700)
committerBrad Hubbard <bhubbard@redhat.com>
Mon, 18 May 2020 04:22:36 +0000 (14:22 +1000)
Summary:
otherwise the env_librados_test executable will fail to link against
librados.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Closes https://github.com/facebook/rocksdb/pull/3724

Differential Revision: D7631542

Pulled By: ajkr

fbshipit-source-id: 38afbf21f9aeb7dedfb840aba8b2f8b421f9edb0

CMakeLists.txt

index 18f896944d9bebe7797ed463687377677c880eff..1d9dfd7a58b6e6575bdd8bb6be35ebae97e689df 100644 (file)
@@ -677,6 +677,14 @@ endif()
 set(ROCKSDB_STATIC_LIB rocksdb${ARTIFACT_SUFFIX})
 set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX})
 set(ROCKSDB_IMPORT_LIB ${ROCKSDB_SHARED_LIB})
+
+option(WITH_LIBRADOS "Build with librados" OFF)
+if(WITH_LIBRADOS)
+  list(APPEND SOURCES
+    utilities/env_librados.cc)
+  list(APPEND THIRDPARTY_LIBS rados)
+endif()
+
 if(WIN32)
   set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib)
   set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
@@ -695,13 +703,6 @@ else()
                         OUTPUT_NAME "rocksdb")
 endif()
 
-option(WITH_LIBRADOS "Build with librados" OFF)
-if(WITH_LIBRADOS)
-  list(APPEND SOURCES
-    utilities/env_librados.cc)
-  list(APPEND THIRDPARTY_LIBS rados)
-endif()
-
 add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES})
 target_link_libraries(${ROCKSDB_STATIC_LIB}
   ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})