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}"
63 rgw_http_client_curl.cc
78 rgw_sync_module_es_rest.cc
79 rgw_sync_module_log.cc
89 rgw_object_expirer_core.cc
108 rgw_rest_replica_log.cc
127 rgw_crypt_sanitize.cc
130 gperf_generate(${CMAKE_SOURCE_DIR}/src/rgw/rgw_iam_policy_keywords.gperf
131 rgw_iam_policy_keywords.frag.cc)
132 set_source_files_properties(rgw_iam_policy.cc PROPERTIES
133 OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/rgw/rgw_iam_policy_keywords.frag.cc
134 COMPILE_FLAGS -I${CMAKE_BINARY_DIR}/src/rgw)
137 if (WITH_RADOSGW_FCGI_FRONTEND)
138 list(APPEND rgw_a_srcs rgw_fcgi.cc)
141 add_library(rgw_a STATIC ${rgw_a_srcs})
143 add_dependencies(rgw_a civetweb_h)
145 target_include_directories(rgw_a SYSTEM PUBLIC "../rapidjson/include")
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})
154 if (WITH_CURL_OPENSSL OR (WITH_RADOSGW_BEAST_FRONTEND AND WITH_RADOSGW_BEAST_OPENSSL))
155 target_link_libraries(rgw_a ${OPENSSL_LIBRARIES})
157 if (WITH_RADOSGW_BEAST_FRONTEND)
158 target_compile_definitions(rgw_a PUBLIC BOOST_COROUTINES_NO_DEPRECATION_WARNING)
159 target_link_libraries(rgw_a Boost::coroutine Boost::context)
163 rgw_loadgen_process.cc
165 rgw_civetweb_frontend.cc
168 if (WITH_RADOSGW_FCGI_FRONTEND)
169 list(APPEND radosgw_srcs rgw_fcgi_process.cc)
172 if (WITH_RADOSGW_BEAST_FRONTEND)
173 list(APPEND radosgw_srcs
175 rgw_asio_frontend.cc)
176 endif (WITH_RADOSGW_BEAST_FRONTEND)
178 add_library(radosgw_a STATIC ${radosgw_srcs}
179 $<TARGET_OBJECTS:civetweb_common_objs>)
180 target_link_libraries(radosgw_a rgw_a ${SSL_LIBRARIES})
182 add_executable(radosgw rgw_main.cc)
183 target_link_libraries(radosgw radosgw_a librados
184 cls_rgw_client cls_lock_client cls_refcount_client
185 cls_log_client cls_statelog_client cls_timeindex_client
186 cls_version_client cls_replica_log_client cls_user_client
187 global ${FCGI_LIBRARY} ${LIB_RESOLV}
188 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES}
190 # radosgw depends on cls libraries at runtime, but not as link dependencies
191 add_dependencies(radosgw cls_rgw cls_lock cls_refcount
192 cls_log cls_statelog cls_timeindex
193 cls_version cls_replica_log cls_user)
194 install(TARGETS radosgw DESTINATION bin)
196 set(radosgw_admin_srcs
199 add_executable(radosgw-admin ${radosgw_admin_srcs})
200 target_link_libraries(radosgw-admin rgw_a librados
201 cls_rgw_client cls_lock_client cls_refcount_client
202 cls_log_client cls_statelog_client cls_timeindex_client
203 cls_version_client cls_replica_log_client cls_user_client
204 global ${FCGI_LIBRARY} ${LIB_RESOLV}
205 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES})
206 install(TARGETS radosgw-admin DESTINATION bin)
210 add_executable(radosgw-es ${radosgw_es_srcs})
211 target_link_libraries(radosgw-es rgw_a librados
212 cls_rgw_client cls_lock_client cls_refcount_client
213 cls_log_client cls_statelog_client cls_timeindex_client
214 cls_version_client cls_replica_log_client cls_user_client
215 global ${FCGI_LIBRARY} ${LIB_RESOLV}
216 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES})
217 install(TARGETS radosgw-es DESTINATION bin)
219 set(radosgw_token_srcs
221 add_executable(radosgw-token ${radosgw_token_srcs})
222 target_link_libraries(radosgw-token librados
223 global ${ALLOC_LIBS})
224 install(TARGETS radosgw-token DESTINATION bin)
226 set(radosgw_object_expirer_srcs
227 rgw_object_expirer.cc)
228 add_executable(radosgw-object-expirer ${radosgw_object_expirer_srcs})
229 target_link_libraries(radosgw-object-expirer rgw_a librados
230 cls_rgw_client cls_lock_client cls_refcount_client
231 cls_log_client cls_statelog_client cls_timeindex_client
232 cls_version_client cls_replica_log_client cls_user_client
233 global ${FCGI_LIBRARY} ${LIB_RESOLV}
234 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES})
235 install(TARGETS radosgw-object-expirer DESTINATION bin)
240 add_library(rgw SHARED ${librgw_srcs})
241 target_link_libraries(rgw LINK_PRIVATE
251 cls_replica_log_client
257 set_target_properties(rgw PROPERTIES OUTPUT_NAME rgw VERSION 2.0.0
259 install(TARGETS rgw DESTINATION ${CMAKE_INSTALL_LIBDIR})