From be98097979a915b37bfc67c31a6205df9340bee0 Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Mon, 25 Feb 2019 19:48:11 +1100 Subject: [PATCH] rpm,cmake: additional fixes to make amqp support optional Signed-off-by: Tim Serong --- ceph.spec.in | 2 ++ src/tools/ceph-dencoder/CMakeLists.txt | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 482a571104212..4bc3c122321a1 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -187,7 +187,9 @@ BuildRequires: xfsprogs BuildRequires: xfsprogs-devel BuildRequires: xmlstarlet BuildRequires: yasm +%if 0%{with amqp_endpoint} BuildRequires: librabbitmq-devel +%endif %if 0%{with make_check} BuildRequires: jq BuildRequires: python%{_python_buildid}-bcrypt diff --git a/src/tools/ceph-dencoder/CMakeLists.txt b/src/tools/ceph-dencoder/CMakeLists.txt index 7720b879c8f46..14370d557a848 100644 --- a/src/tools/ceph-dencoder/CMakeLists.txt +++ b/src/tools/ceph-dencoder/CMakeLists.txt @@ -22,6 +22,10 @@ if(WITH_RADOSGW) list(APPEND DENCODER_EXTRALIBS rgw_a cls_rgw_client) + if(WITH_RADOSGW_AMQP_ENDPOINT) + list(APPEND DENCODER_EXTRALIBS + rabbitmq) + endif() endif() if(WITH_RBD) @@ -56,6 +60,5 @@ target_link_libraries(ceph-dencoder cls_journal_client cls_timeindex_client ${EXTRALIBS} - ${CMAKE_DL_LIBS} - rabbitmq) + ${CMAKE_DL_LIBS}) install(TARGETS ceph-dencoder DESTINATION bin) -- 2.39.5