]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Use ld.so to link in ssl crypto (cmake changes).
authorMarcus Watts <mwatts@redhat.com>
Thu, 11 Feb 2016 00:14:06 +0000 (19:14 -0500)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 26 Feb 2016 20:29:47 +0000 (12:29 -0800)
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 <mwatts@redhat.com>
src/CMakeLists.txt

index 2cedec6c00397d0ba699b7005069773fa11b5589..2172b510863092ddd19128f5ec0ce9731286a399 100644 (file)
@@ -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} $<TARGET_OBJECTS:heap_profiler_objs>)
+  add_executable(radosgw ${radosgw_srcs}  $<TARGET_OBJECTS:civetweb_common_objs>
+                $<TARGET_OBJECTS:heap_profiler_objs>)
   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} $<TARGET_OBJECTS:heap_profiler_objs>)
@@ -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)