|
1 | | -set(libos_srcs |
| 1 | +add_library(os STATIC |
2 | 2 | ObjectStore.cc |
3 | | - Transaction.cc |
4 | | - memstore/MemStore.cc |
5 | | - kstore/KStore.cc |
6 | | - kstore/kstore_types.cc |
7 | | - fs/FS.cc) |
| 3 | + Transaction.cc) |
8 | 4 |
|
9 | | -if(WITH_BLUESTORE) |
10 | | - list(APPEND libos_srcs |
11 | | - bluestore/Allocator.cc |
12 | | - bluestore/AllocatorBase.cc |
13 | | - bluestore/BitmapFreelistManager.cc |
14 | | - bluestore/BlueFS.cc |
15 | | - bluestore/bluefs_types.cc |
16 | | - bluestore/BlueRocksEnv.cc |
17 | | - bluestore/BlueStore.cc |
18 | | - bluestore/BlueStore_debug.cc |
19 | | - bluestore/simple_bitmap.cc |
20 | | - bluestore/bluestore_types.cc |
21 | | - bluestore/fastbmap_allocator_impl.cc |
22 | | - bluestore/FreelistManager.cc |
23 | | - bluestore/StupidAllocator.cc |
24 | | - bluestore/BitmapAllocator.cc |
25 | | - bluestore/AvlAllocator.cc |
26 | | - bluestore/BtreeAllocator.cc |
27 | | - bluestore/Btree2Allocator.cc |
28 | | - bluestore/HybridAllocator.cc |
29 | | - bluestore/Writer.cc |
30 | | - bluestore/Compression.cc |
31 | | - bluestore/BlueAdmin.cc |
32 | | - bluestore/BlueEnv.cc |
33 | | - ) |
34 | | -endif(WITH_BLUESTORE) |
35 | | - |
36 | | -if(WITH_FUSE) |
37 | | - list(APPEND libos_srcs |
38 | | - FuseStore.cc) |
39 | | -endif(WITH_FUSE) |
40 | | - |
41 | | -if(HAVE_LIBXFS) |
42 | | - list(APPEND libos_srcs |
43 | | - fs/XFS.cc) |
44 | | -endif() |
| 5 | +target_link_libraries(os |
| 6 | + PRIVATE |
| 7 | + legacy-option-headers |
| 8 | + ${FMT_LIB}) |
45 | 9 |
|
46 | | -add_library(os STATIC ${libos_srcs}) |
| 10 | +add_subdirectory(memstore) |
47 | 11 | target_link_libraries(os |
48 | | - legacy-option-headers |
49 | | - blk |
50 | | - ${FMT_LIB}) |
| 12 | + PRIVATE memstore) |
51 | 13 |
|
52 | | -target_compile_definitions(os PRIVATE -DWITH_KSTORE) |
53 | | -target_link_libraries(os heap_profiler kv) |
| 14 | +add_subdirectory(kstore) |
| 15 | +target_link_libraries(os |
| 16 | + PRIVATE |
| 17 | + kstore) |
54 | 18 |
|
55 | | -if(WITH_BLUEFS) |
56 | | - add_library(bluefs SHARED |
57 | | - bluestore/BlueRocksEnv.cc) |
58 | | - target_include_directories(bluefs SYSTEM PUBLIC |
59 | | - $<TARGET_PROPERTY:RocksDB::RocksDB,INTERFACE_INCLUDE_DIRECTORIES>) |
60 | | - target_link_libraries(bluefs global) |
61 | | - install(TARGETS bluefs DESTINATION lib) |
62 | | -endif(WITH_BLUEFS) |
| 19 | +if(WITH_BLUESTORE) |
| 20 | + add_subdirectory(bluestore) |
| 21 | + target_link_libraries(os |
| 22 | + PRIVATE bluestore) |
| 23 | +endif() |
63 | 24 |
|
64 | 25 | if(WITH_FUSE) |
65 | | - target_link_libraries(os FUSE::FUSE) |
| 26 | + add_library(fusestore |
| 27 | + FuseStore.cc) |
| 28 | + target_link_libraries(fusestore |
| 29 | + PRIVATE FUSE::FUSE) |
| 30 | + target_link_libraries(os |
| 31 | + PRIVATE fusestore) |
66 | 32 | endif() |
67 | 33 |
|
68 | 34 | if(WITH_LTTNG) |
69 | 35 | add_dependencies(os objectstore-tp) |
70 | | - add_dependencies(os bluestore-tp) |
71 | 36 | endif() |
72 | 37 |
|
73 | 38 | if(WITH_JAEGER) |
74 | 39 | add_dependencies(os jaeger_base) |
75 | | - target_link_libraries(os jaeger_base) |
| 40 | + target_link_libraries(os |
| 41 | + PRIVATE jaeger_base) |
76 | 42 | endif() |
77 | 43 |
|
78 | | -target_link_libraries(os kv) |
79 | | - |
80 | | -add_dependencies(os compressor_plugins) |
81 | | -add_dependencies(os crypto_plugins) |
82 | | - |
83 | | - |
84 | 44 | if(WITH_BLUESTORE) |
85 | 45 | add_executable(ceph-bluestore-tool |
86 | 46 | bluestore/bluestore_tool.cc) |
87 | 47 | target_link_libraries(ceph-bluestore-tool |
88 | | - os global) |
| 48 | + global kv os) |
89 | 49 | install(TARGETS ceph-bluestore-tool |
90 | 50 | DESTINATION bin) |
91 | 51 | endif() |
0 commit comments