]> git.proxmox.com Git - ceph.git/blob - ceph/src/kv/CMakeLists.txt
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / kv / CMakeLists.txt
1 set(kv_srcs
2 KeyValueDB.cc
3 MemDB.cc
4 RocksDBStore.cc)
5
6 if (WITH_LEVELDB)
7 list(APPEND kv_srcs LevelDBStore.cc)
8 endif (WITH_LEVELDB)
9
10 add_library(kv_objs OBJECT ${kv_srcs})
11 add_library(kv STATIC $<TARGET_OBJECTS:kv_objs>)
12 target_include_directories(kv_objs BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR})
13 target_include_directories(kv BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR})
14 target_link_libraries(kv ${LEVELDB_LIBRARIES} ${ROCKSDB_LIBRARIES} ${ALLOC_LIBS} ${SNAPPY_LIBRARIES} ${ZLIB_LIBRARIES})
15
16 # rocksdb detects bzlib and lz4 in its Makefile, which forces us to do the same.
17 find_package(BZip2 QUIET)
18 if (BZIP2_FOUND)
19 target_link_libraries(kv ${BZIP2_LIBRARIES})
20 endif (BZIP2_FOUND)
21 find_package(LZ4 QUIET)
22 if (LZ4_FOUND)
23 target_link_libraries(kv ${LZ4_LIBRARY})
24 endif (LZ4_FOUND)