cmake: append rados to THIRDPARTY_LIBS before appending it to LIBS
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
This commit is contained in:
parent
81d44f2bc5
commit
9fcd82e987
@ -677,6 +677,14 @@ endif()
|
|||||||
set(ROCKSDB_STATIC_LIB rocksdb${ARTIFACT_SUFFIX})
|
set(ROCKSDB_STATIC_LIB rocksdb${ARTIFACT_SUFFIX})
|
||||||
set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX})
|
set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX})
|
||||||
set(ROCKSDB_IMPORT_LIB ${ROCKSDB_SHARED_LIB})
|
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)
|
if(WIN32)
|
||||||
set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib)
|
set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib)
|
||||||
set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
||||||
@ -695,13 +703,6 @@ else()
|
|||||||
OUTPUT_NAME "rocksdb")
|
OUTPUT_NAME "rocksdb")
|
||||||
endif()
|
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})
|
add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES})
|
||||||
target_link_libraries(${ROCKSDB_STATIC_LIB}
|
target_link_libraries(${ROCKSDB_STATIC_LIB}
|
||||||
${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
|
||||||
|
Loading…
Reference in New Issue
Block a user