diff --git a/CMakeLists.txt b/CMakeLists.txt index 18f896944..1d9dfd7a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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})