From: Marcus Watts Date: Thu, 11 Feb 2016 00:14:06 +0000 (-0500) Subject: Use ld.so to link in ssl crypto (cmake changes). X-Git-Tag: v10.1.0~283^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b451cbb368100f10b734061ad957fbafd4780991;p=ceph.git Use ld.so to link in ssl crypto (cmake changes). Using dlopen() to load in ssl crypto makes me cringe. Also it requires either installing the devel package, or appending library versioning to the library name civetweb tries to load, which is ugly. This is only a license problem for people whose system distribution does not include openssl. Signed-off-by: Marcus Watts --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2cedec6c0039..2172b5108630 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1195,6 +1195,11 @@ if(${WITH_RADOSGW}) rgw/rgw_xml_enc.cc ) + set(civetweb_common_files civetweb/src/civetweb.c) + add_library(civetweb_common_objs OBJECT ${civetweb_common_files}) + set_property(TARGET civetweb_common_objs + APPEND PROPERTY COMPILE_DEFINITIONS NO_SSL_DL=1) + add_library(rgw_a STATIC ${rgw_a_srcs}) target_include_directories(rgw_a PUBLIC "${CMAKE_SOURCE_DIR}/src/civetweb/include") target_link_libraries(rgw_a librados cls_rgw_client cls_refcount_client @@ -1211,7 +1216,6 @@ if(${WITH_RADOSGW}) rgw/rgw_civetweb.cc rgw/rgw_civetweb_frontend.cc rgw/rgw_civetweb_log.cc - civetweb/src/civetweb.c rgw/rgw_main.cc) set(radosgw_admin_srcs @@ -1251,12 +1255,13 @@ if(${WITH_RADOSGW}) include/rados/rgw_file.h DESTINATION include/rados) - add_executable(radosgw ${radosgw_srcs} $) + add_executable(radosgw ${radosgw_srcs} $ + $) target_link_libraries(radosgw rgw_a librados cls_rgw_client cls_lock_client cls_refcount_client cls_log_client cls_statelog_client cls_timeindex_client cls_version_client cls_replica_log_client cls_user_client - curl expat global fcgi resolv ${BLKID_LIBRARIES} ${ALLOC_LIBS}) + curl expat global fcgi resolv ssl crypto ${BLKID_LIBRARIES} ${ALLOC_LIBS}) install(TARGETS radosgw DESTINATION bin) add_executable(radosgw-admin ${radosgw_admin_srcs} $) @@ -1264,7 +1269,7 @@ if(${WITH_RADOSGW}) cls_rgw_client cls_lock_client cls_refcount_client cls_log_client cls_statelog_client cls_timeindex_client cls_version_client cls_replica_log_client cls_user_client - curl expat global fcgi resolv ${BLKID_LIBRARIES} ${ALLOC_LIBS}) + curl expat global fcgi resolv ssl crypto ${BLKID_LIBRARIES} ${ALLOC_LIBS}) install(TARGETS radosgw-admin DESTINATION bin)