Merge pull request #56626 from rhcs-dashboard/fix-prometheus-conf-mgr-failover
[ceph.git] / src / os / CMakeLists.txt
1 set(libos_srcs
2   ObjectStore.cc
3   Transaction.cc
4   filestore/chain_xattr.cc
5   filestore/BtrfsFileStoreBackend.cc
6   filestore/DBObjectMap.cc
7   filestore/FileJournal.cc
8   filestore/FileStore.cc
9   filestore/JournalThrottle.cc
10   filestore/GenericFileStoreBackend.cc
11   filestore/JournalingObjectStore.cc
12   filestore/HashIndex.cc
13   filestore/IndexManager.cc
14   filestore/LFNIndex.cc
15   filestore/WBThrottle.cc
16   filestore/os_xattr.c
17   memstore/MemStore.cc
18   kstore/KStore.cc
19   kstore/kstore_types.cc
20   fs/FS.cc)
21
22 if(WITH_BLUESTORE)
23   list(APPEND libos_srcs
24     bluestore/Allocator.cc
25     bluestore/BitmapFreelistManager.cc
26     bluestore/BlueFS.cc
27     bluestore/bluefs_types.cc
28     bluestore/BlueRocksEnv.cc
29     bluestore/BlueStore.cc
30     bluestore/bluestore_types.cc
31     bluestore/fastbmap_allocator_impl.cc
32     bluestore/FreelistManager.cc
33     bluestore/StupidAllocator.cc
34     bluestore/BitmapAllocator.cc
35     bluestore/AvlAllocator.cc
36     bluestore/HybridAllocator.cc
37   )
38 endif(WITH_BLUESTORE)
39
40 if(WITH_LIBZBD)
41   list(APPEND libos_srcs
42     bluestore/zoned_types.cc
43     bluestore/ZonedFreelistManager.cc
44     bluestore/ZonedAllocator.cc)
45 endif()
46
47 if(WITH_FUSE)
48   list(APPEND libos_srcs
49     FuseStore.cc)
50 endif(WITH_FUSE)
51
52 if(HAVE_LIBXFS)
53   list(APPEND libos_srcs
54     filestore/XfsFileStoreBackend.cc
55     fs/XFS.cc)
56 endif()
57
58 if(HAVE_LIBZFS)
59   add_library(os_zfs_objs OBJECT
60     filestore/ZFSFileStoreBackend.cc
61     fs/ZFS.cc)
62   target_include_directories(os_zfs_objs SYSTEM PRIVATE
63     ${ZFS_INCLUDE_DIRS})
64   list(APPEND libos_srcs $<TARGET_OBJECTS:os_zfs_objs>)
65 endif()
66
67 add_library(os STATIC ${libos_srcs})
68 target_link_libraries(os blk)
69
70 target_link_libraries(os heap_profiler kv)
71
72 if(WITH_BLUEFS)
73   add_library(bluefs SHARED 
74     bluestore/BlueRocksEnv.cc)
75   target_include_directories(bluefs SYSTEM PUBLIC
76     $<TARGET_PROPERTY:RocksDB::RocksDB,INTERFACE_INCLUDE_DIRECTORIES>)
77   target_link_libraries(bluefs global)
78   install(TARGETS bluefs DESTINATION lib)
79 endif(WITH_BLUEFS)
80
81 if(WITH_FUSE)
82   target_link_libraries(os FUSE::FUSE)
83 endif()
84
85 if(HAVE_LIBZFS)
86   target_link_libraries(os ${ZFS_LIBRARIES})
87 endif()
88
89 if(WITH_LTTNG)
90   add_dependencies(os objectstore-tp)
91   add_dependencies(os bluestore-tp)
92 endif()
93
94 target_link_libraries(os kv)
95
96 add_dependencies(os compressor_plugins)
97 add_dependencies(os crypto_plugins)
98
99
100 if(WITH_BLUESTORE)
101   add_executable(ceph-bluestore-tool
102     bluestore/bluestore_tool.cc)
103   target_link_libraries(ceph-bluestore-tool
104     os global)
105   install(TARGETS ceph-bluestore-tool
106     DESTINATION bin)
107 endif()