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
88 rgw_object_expirer_core.cc
107 rgw_rest_replica_log.cc
126 rgw_crypt_sanitize.cc
129 gperf_generate(${CMAKE_SOURCE_DIR}/src/rgw/rgw_iam_policy_keywords.gperf
130 rgw_iam_policy_keywords.frag.cc)
131 set_source_files_properties(rgw_iam_policy.cc PROPERTIES
132 OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/rgw/rgw_iam_policy_keywords.frag.cc
133 COMPILE_FLAGS -I${CMAKE_BINARY_DIR}/src/rgw)
136 if (WITH_RADOSGW_FCGI_FRONTEND)
137 list(APPEND rgw_a_srcs rgw_fcgi.cc)
140 add_library(rgw_a STATIC ${rgw_a_srcs})
142 add_dependencies(rgw_a civetweb_h)
144 target_include_directories(rgw_a PUBLIC
146 "../rapidjson/include"
148 target_compile_definitions(rgw_a PUBLIC BOOST_COROUTINES_NO_DEPRECATION_WARNING)
150 target_link_libraries(rgw_a librados cls_lock_client cls_rgw_client cls_refcount_client
151 cls_log_client cls_statelog_client cls_timeindex_client cls_version_client
152 cls_replica_log_client cls_user_client ceph-common common_utf8 global
155 ${OPENLDAP_LIBRARIES} ${CRYPTO_LIBS})
158 rgw_loadgen_process.cc
160 rgw_civetweb_frontend.cc
163 if (WITH_RADOSGW_FCGI_FRONTEND)
164 list(APPEND radosgw_srcs rgw_fcgi_process.cc)
167 if (WITH_RADOSGW_BEAST_FRONTEND)
168 list(APPEND radosgw_srcs
170 rgw_asio_frontend.cc)
171 endif (WITH_RADOSGW_BEAST_FRONTEND)
173 add_library(radosgw_a STATIC ${radosgw_srcs}
174 $<TARGET_OBJECTS:civetweb_common_objs>)
175 target_link_libraries(radosgw_a rgw_a ${SSL_LIBRARIES})
177 add_executable(radosgw rgw_main.cc)
178 target_link_libraries(radosgw radosgw_a librados
179 cls_rgw_client cls_lock_client cls_refcount_client
180 cls_log_client cls_statelog_client cls_timeindex_client
181 cls_version_client cls_replica_log_client cls_user_client
182 global ${FCGI_LIBRARY} ${LIB_RESOLV}
183 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES}
185 # radosgw depends on cls libraries at runtime, but not as link dependencies
186 add_dependencies(radosgw cls_rgw cls_lock cls_refcount
187 cls_log cls_statelog cls_timeindex
188 cls_version cls_replica_log cls_user)
189 install(TARGETS radosgw DESTINATION bin)
191 set(radosgw_admin_srcs
194 add_executable(radosgw-admin ${radosgw_admin_srcs})
195 target_link_libraries(radosgw-admin rgw_a librados
196 cls_rgw_client cls_lock_client cls_refcount_client
197 cls_log_client cls_statelog_client cls_timeindex_client
198 cls_version_client cls_replica_log_client cls_user_client
199 global ${FCGI_LIBRARY} ${LIB_RESOLV}
200 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES})
201 install(TARGETS radosgw-admin DESTINATION bin)
205 add_executable(radosgw-es ${radosgw_es_srcs})
206 target_link_libraries(radosgw-es rgw_a librados
207 cls_rgw_client cls_lock_client cls_refcount_client
208 cls_log_client cls_statelog_client cls_timeindex_client
209 cls_version_client cls_replica_log_client cls_user_client
210 global ${FCGI_LIBRARY} ${LIB_RESOLV}
211 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES})
212 install(TARGETS radosgw-es DESTINATION bin)
214 set(radosgw_token_srcs
216 add_executable(radosgw-token ${radosgw_token_srcs})
217 target_link_libraries(radosgw-token librados
218 global ${ALLOC_LIBS})
219 install(TARGETS radosgw-token DESTINATION bin)
221 set(radosgw_object_expirer_srcs
222 rgw_object_expirer.cc)
223 add_executable(radosgw-object-expirer ${radosgw_object_expirer_srcs})
224 target_link_libraries(radosgw-object-expirer rgw_a librados
225 cls_rgw_client cls_lock_client cls_refcount_client
226 cls_log_client cls_statelog_client cls_timeindex_client
227 cls_version_client cls_replica_log_client cls_user_client
228 global ${FCGI_LIBRARY} ${LIB_RESOLV}
229 ${CURL_LIBRARIES} ${EXPAT_LIBRARIES})
230 install(TARGETS radosgw-object-expirer DESTINATION bin)
235 add_library(rgw SHARED ${librgw_srcs})
236 target_link_libraries(rgw LINK_PRIVATE
246 cls_replica_log_client
252 set_target_properties(rgw PROPERTIES OUTPUT_NAME rgw VERSION 2.0.0
254 install(TARGETS rgw DESTINATION ${CMAKE_INSTALL_LIBDIR})
257 include(MergeStaticLibraries)
258 add_library(cephd_rgw_base STATIC rgw_main.cc ${radosgw_admin_srcs})
259 if(WITH_RADOSGW_FCGI_FRONTEND)
260 target_include_directories(cephd_rgw_base PUBLIC ${FCGI_INCLUDE_DIR})
262 set_target_properties(cephd_rgw_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
263 merge_static_libraries(cephd_rgw cephd_rgw_base rgw_a radosgw_a)
264 if(WITH_RADOSGW_FCGI_FRONTEND)
265 target_link_libraries(cephd_rgw ${FCGI_LIBRARY})