Skip to content

Commit

Permalink
Merge pull request ceph#24368 from tchaikov/wip-cmake-cleanup
Browse files Browse the repository at this point in the history
cmake: use OpenSSL::Crypto instead of OPENSSL_LIBRARIES

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
tchaikov authored Oct 10, 2018
2 parents f9c7920 + 1fb419c commit 2e146bf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ find_package(OpenSSL REQUIRED)
# TODO: use NSS only for validation of the OpenSSL-based implementations
set(USE_NSS 1)
set(USE_OPENSSL 1)
set(CRYPTO_LIBS ${NSS_LIBRARIES} ${NSPR_LIBRARIES} ${OPENSSL_LIBRARIES})
set(SSL_LIBRARIES ${NSS_LIBRARIES} ${OPENSSL_LIBRARIES})
set(CRYPTO_LIBS ${NSS_LIBRARIES} ${NSPR_LIBRARIES} OpenSSL::Crypto)

option(WITH_XIO "Enable XIO messaging" OFF)
if(WITH_XIO)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ suitable for installation we recommend you build deb or rpm packages,
or refer to the `ceph.spec.in` or `debian/rules` to see which
configuration options are specified for production builds.

Prerequisite: CMake 2.8.12
Prerequisite: CMake 3.5.1

Build instructions:

Expand Down
2 changes: 1 addition & 1 deletion src/crimson/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ target_link_libraries(crimson-common
crimson::cflags
Boost::iostreams
Boost::random
${NSS_LIBRARIES} ${NSPR_LIBRARIES} ${OPENSSL_LIBRARIES})
${NSS_LIBRARIES} ${NSPR_LIBRARIES} OpenSSL::Crypto)

set(crimson_net_srcs
net/Dispatcher.cc
Expand Down
23 changes: 14 additions & 9 deletions src/rgw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,16 @@ target_link_libraries(rgw_a librados cls_otp_client cls_lock_client cls_rgw_clie
${OPENLDAP_LIBRARIES} ${CRYPTO_LIBS}
OATH::OATH)

if(WITH_CURL_OPENSSL)
# used by rgw_http_client_curl.cc
target_link_libraries(rgw_a PRIVATE OpenSSL::Crypto)
endif()

if (WITH_RADOSGW_BEAST_FRONTEND)
target_compile_definitions(rgw_a PUBLIC BOOST_COROUTINES_NO_DEPRECATION_WARNING)
target_link_libraries(rgw_a Boost::coroutine Boost::context)
endif()

if (WITH_CURL_OPENSSL OR (WITH_RADOSGW_BEAST_FRONTEND AND WITH_RADOSGW_BEAST_OPENSSL))
target_link_libraries(rgw_a ${OPENSSL_LIBRARIES})
endif()

set(radosgw_srcs
rgw_loadgen_process.cc
rgw_civetweb.cc
Expand All @@ -192,15 +193,19 @@ if (WITH_RADOSGW_FCGI_FRONTEND)
list(APPEND radosgw_srcs rgw_fcgi_process.cc)
endif()

if (WITH_RADOSGW_BEAST_FRONTEND)
if(WITH_RADOSGW_BEAST_FRONTEND)
list(APPEND radosgw_srcs
rgw_asio_client.cc
rgw_asio_frontend.cc)
endif (WITH_RADOSGW_BEAST_FRONTEND)
endif()

add_library(radosgw_a STATIC ${radosgw_srcs}
$<TARGET_OBJECTS:civetweb_common_objs>)
target_link_libraries(radosgw_a rgw_a ${SSL_LIBRARIES})
target_link_libraries(radosgw_a PRIVATE rgw_a)
if(WITH_RADOSGW_BEAST_FRONTEND AND WITH_RADOSGW_BEAST_OPENSSL)
# used by rgw_asio_frontend.cc
target_link_libraries(radosgw_a PRIVATE OpenSSL::SSL)
endif()

add_executable(radosgw rgw_main.cc)
target_link_libraries(radosgw radosgw_a librados
Expand All @@ -225,7 +230,7 @@ target_link_libraries(radosgw-admin rgw_a librados
cls_log_client cls_timeindex_client
cls_version_client cls_user_client
global ${FCGI_LIBRARY} ${LIB_RESOLV}
${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES})
${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES})
install(TARGETS radosgw-admin DESTINATION bin)

set(radosgw_es_srcs
Expand All @@ -236,7 +241,7 @@ target_link_libraries(radosgw-es rgw_a librados
cls_log_client cls_timeindex_client
cls_version_client cls_user_client
global ${FCGI_LIBRARY} ${LIB_RESOLV}
${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${SSL_LIBRARIES} ${BLKID_LIBRARIES})
${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES})
install(TARGETS radosgw-es DESTINATION bin)

set(radosgw_token_srcs
Expand Down

0 comments on commit 2e146bf

Please sign in to comment.