]> git.proxmox.com Git - ceph.git/blob - ceph/src/tools/ceph-dencoder/CMakeLists.txt
af767e01360f2192c6f817221ff7b65700872c35
[ceph.git] / ceph / src / tools / ceph-dencoder / CMakeLists.txt
1 ## dencoder
2 set_source_files_properties(
3 ceph_dencoder.cc
4 APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/include/ceph_ver.h)
5
6 if(HAS_VTA)
7 set_source_files_properties(ceph_dencoder.cc
8 PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments)
9 endif()
10
11 set(dencoder_srcs
12 ceph_dencoder.cc
13 ../../include/uuid.cc
14 ../../include/utime.cc
15 $<TARGET_OBJECTS:common_texttable_obj>)
16 add_executable(ceph-dencoder ${dencoder_srcs})
17 set_target_properties(ceph-dencoder PROPERTIES
18 JOB_POOL_COMPILE heavy_compile_job_pool
19 JOB_POOL_LINK heavy_link_job_pool)
20
21 set(denc_plugin_dir ${CEPH_INSTALL_FULL_PKGLIBDIR}/denc)
22 add_custom_target(ceph-dencoder-modules)
23
24 function(add_denc_mod name)
25 add_library(${name} SHARED
26 ${ARGN})
27 set_target_properties(${name} PROPERTIES
28 PREFIX ""
29 OUTPUT_NAME ${name}
30 CXX_VISIBILITY_PRESET hidden
31 VISIBILITY_INLINES_HIDDEN ON)
32 install(
33 TARGETS ${name}
34 DESTINATION ${denc_plugin_dir})
35 add_dependencies(ceph-dencoder-modules
36 ${name})
37 endfunction()
38
39 add_denc_mod(denc-mod-common
40 common_types.cc)
41 target_link_libraries(denc-mod-common
42 journal
43 cls_cas_internal
44 cls_lock_client
45 cls_refcount_client
46 cls_timeindex_client)
47 add_denc_mod(denc-mod-osd
48 osd_types.cc)
49 target_link_libraries(denc-mod-osd
50 os
51 osd
52 mon)
53
54 if(WITH_RADOSGW)
55 add_denc_mod(denc-mod-rgw
56 rgw_types.cc
57 ${CMAKE_SOURCE_DIR}/src/rgw/rgw_dencoder.cc)
58 target_link_libraries(denc-mod-rgw
59 rgw_a
60 cls_rgw_client
61 cls_journal_client)
62 if(WITH_RADOSGW_AMQP_ENDPOINT)
63 target_link_libraries(denc-mod-rgw
64 rabbitmq ssl)
65 endif()
66 if(WITH_RADOSGW_KAFKA_ENDPOINT)
67 target_link_libraries(denc-mod-rgw
68 rdkafka)
69 endif()
70 endif()
71
72 if(WITH_RBD)
73 add_denc_mod(denc-mod-rbd
74 rbd_types.cc)
75 target_link_libraries(denc-mod-rbd
76 cls_rbd_client
77 rbd_mirror_types
78 rbd_types
79 rbd_replay_types)
80 if(WITH_KRBD)
81 target_link_libraries(denc-mod-rbd
82 krbd)
83 endif()
84 endif()
85
86 if(WITH_CEPHFS)
87 add_denc_mod(denc-mod-cephfs
88 mds_types.cc)
89 target_link_libraries(denc-mod-cephfs
90 mds)
91 endif()
92
93 target_compile_definitions(ceph-dencoder PRIVATE
94 "CEPH_DENC_MOD_DIR=\"${denc_plugin_dir}\"")
95
96 target_link_libraries(ceph-dencoder
97 StdFilesystem::filesystem
98 global
99 ${DENCODER_EXTRALIBS}
100 cls_log_client
101 cls_version_client
102 cls_user_client
103 cls_cas_client
104 ${EXTRALIBS}
105 ${CMAKE_DL_LIBS}
106 ${ALLOC_LIBS})
107 install(TARGETS ceph-dencoder DESTINATION bin)