Skip to content

Commit de020be

Browse files
committed
Fix CMake build by conditionally linking rpcrt4.lib
1 parent b8e5cc1 commit de020be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ if (BIND_ROCKSDB)
4848

4949
find_package(RocksDB CONFIG)
5050
if(RocksDB_FOUND)
51-
target_link_libraries(ycsb PRIVATE RocksDB::rocksdb rpcrt4.lib)
51+
if(MSVC)
52+
target_link_libraries(ycsb PRIVATE RocksDB::rocksdb rpcrt4.lib)
53+
else()
54+
target_link_libraries(ycsb PRIVATE RocksDB::rocksdb)
55+
endif()
5256
else()
5357
message(STATUS "Try to find rocksdb library using find_library")
5458
find_library(ROCKSDB_LIB rocksdb REQUIRED)

0 commit comments

Comments
 (0)