2 add_executable(ceph_rgw_jsonparser
4 target_link_libraries(ceph_rgw_jsonparser
8 add_executable(ceph_rgw_multiparser
10 target_link_libraries(ceph_rgw_multiparser
20 add_custom_target(civetweb_h
21 COMMAND ${CMAKE_COMMAND} -E make_directory
22 "${CMAKE_BINARY_DIR}/src/include/civetweb"
23 COMMAND ${CMAKE_COMMAND} -E copy_if_different
24 "${CMAKE_SOURCE_DIR}/src/civetweb/include/civetweb.h"
25 "${CMAKE_BINARY_DIR}/src/include/civetweb"
26 COMMENT "keep civetweb.h up-to-date")
28 find_program(GPERF gperf)
30 message(FATAL_ERROR "Can't find gperf")
32 function(gperf_generate input output)
35 COMMAND ${GPERF} ${input} > ${output}
37 COMMENT "Generate ${output}"
77 rgw_sync_module_es_rest.cc
78 rgw_sync_module_log.cc
87 rgw_object_expirer_core.cc
106 rgw_rest_replica_log.cc
122 rgw_crypt_sanitize.cc
125 gperf_generate(${CMAKE_SOURCE_DIR}/src/rgw/rgw_iam_policy_keywords.gperf
126 rgw_iam_policy_keywords.frag.cc)
127 set_source_files_properties(rgw_iam_policy.cc PROPERTIES
128 OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/rgw/rgw_iam_policy_keywords.frag.cc
129 COMPILE_FLAGS -I${CMAKE_BINARY_DIR}/src/rgw)
132 if (WITH_RADOSGW_FCGI_FRONTEND)
133 list(APPEND rgw_a_srcs rgw_fcgi.cc)
136 add_library(rgw_a STATIC ${rgw_a_srcs})
138 add_dependencies(rgw_a civetweb_h)
140 target_include_directories(rgw_a PUBLIC
143 "../rapidjson/include"
145 target_compile_definitions(rgw_a PUBLIC BOOST_COROUTINES_NO_DEPRECATION_WARNING)
147 target_link_libraries(rgw_a librados cls_lock_client cls_rgw_client cls_refcount_client
148 cls_log_client cls_statelog_client cls_timeindex_client cls_version_client
149 cls_replica_log_client cls_user_client ceph-common common_utf8 global
152 ${OPENLDAP_LIBRARIES} ${CRYPTO_LIBS})
155 rgw_loadgen_process.cc
157 rgw_civetweb_frontend.cc
160 if (WITH_RADOSGW_FCGI_FRONTEND)
161 list(APPEND radosgw_srcs rgw_fcgi_process.cc)
164 if (WITH_RADOSGW_BEAST_FRONTEND)
165 list(APPEND radosgw_srcs
167 rgw_asio_frontend.cc)
168 endif (WITH_RADOSGW_BEAST_FRONTEND)
170 add_library(radosgw_a STATIC ${radosgw_srcs}
171 $<TARGET_OBJECTS:civetweb_common_objs>)
172 target_link_libraries(radosgw_a rgw_a ${SSL_LIBRARIES})
173 if(WITH_RADOSGW_BEAST_FRONTEND)
174 target_link_libraries(radosgw_a
179 add_executable(radosgw rgw_main.cc)
180 target_link_libraries(radosgw radosgw_a librados
181 cls_rgw_client cls_lock_client cls_refcount_client
182 cls_log_client cls_statelog_client cls_timeindex_client
183 cls_version_client cls_replica_log_client cls_user_client
184 global ${FCGI_LIBRARY} ${LIB_RESOLV}
185 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES}
187 # radosgw depends on cls libraries at runtime, but not as link dependencies
188 add_dependencies(radosgw cls_rgw cls_lock cls_refcount
189 cls_log cls_statelog cls_timeindex
190 cls_version cls_replica_log cls_user)
191 install(TARGETS radosgw DESTINATION bin)
193 set(radosgw_admin_srcs
196 add_executable(radosgw-admin ${radosgw_admin_srcs})
197 target_link_libraries(radosgw-admin rgw_a librados
198 cls_rgw_client cls_lock_client cls_refcount_client
199 cls_log_client cls_statelog_client cls_timeindex_client
200 cls_version_client cls_replica_log_client cls_user_client
201 global ${FCGI_LIBRARY} ${LIB_RESOLV}
202 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES})
203 install(TARGETS radosgw-admin DESTINATION bin)
207 add_executable(radosgw-es ${radosgw_es_srcs})
208 target_link_libraries(radosgw-es rgw_a librados
209 cls_rgw_client cls_lock_client cls_refcount_client
210 cls_log_client cls_statelog_client cls_timeindex_client
211 cls_version_client cls_replica_log_client cls_user_client
212 global ${FCGI_LIBRARY} ${LIB_RESOLV}
213 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES})
214 install(TARGETS radosgw-es DESTINATION bin)
216 set(radosgw_token_srcs
218 add_executable(radosgw-token ${radosgw_token_srcs})
219 target_link_libraries(radosgw-token librados
220 global ${ALLOC_LIBS})
221 install(TARGETS radosgw-token DESTINATION bin)
223 set(radosgw_object_expirer_srcs
224 rgw_object_expirer.cc)
225 add_executable(radosgw-object-expirer ${radosgw_object_expirer_srcs})
226 target_link_libraries(radosgw-object-expirer rgw_a librados
227 cls_rgw_client cls_lock_client cls_refcount_client
228 cls_log_client cls_statelog_client cls_timeindex_client
229 cls_version_client cls_replica_log_client cls_user_client
230 global ${FCGI_LIBRARY} ${LIB_RESOLV}
231 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES})
232 install(TARGETS radosgw-object-expirer DESTINATION bin)
237 add_library(rgw SHARED ${librgw_srcs})
238 target_link_libraries(rgw LINK_PRIVATE
248 cls_replica_log_client
254 set_target_properties(rgw PROPERTIES OUTPUT_NAME rgw VERSION 2.0.0
256 install(TARGETS rgw DESTINATION ${CMAKE_INSTALL_LIBDIR})
259 include(MergeStaticLibraries)
260 add_library(cephd_rgw_base STATIC rgw_main.cc ${radosgw_admin_srcs})
261 if(WITH_RADOSGW_FCGI_FRONTEND)
262 target_include_directories(cephd_rgw_base PUBLIC ${FCGI_INCLUDE_DIR})
264 set_target_properties(cephd_rgw_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
265 merge_static_libraries(cephd_rgw cephd_rgw_base rgw_a radosgw_a)
266 if(WITH_RADOSGW_FCGI_FRONTEND)
267 target_link_libraries(cephd_rgw ${FCGI_LIBRARY})