From 728954276041cad38dc8456233efbae9c3819039 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Sun, 15 Mar 2015 20:11:48 +0100 Subject: [PATCH] src/CMakeLists.txt: fix build to work with nss Add nss and nspr include dirs to CXX_FLAGS if all dependencies are found. the ceph-authtool target needs also ${CRYPTO_LIBS}. Signed-off-by: Danny Al-Gaaf --- src/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ba52cecf29dd..94b08e95bfaf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -25,7 +25,13 @@ if(WITH_CDS) list(APPEND EXTRALIBS ${CDS_LIBS}) endif(WITH_CDS) -set(CRYPTO_LIBS cryptopp) +if(USE_NSS) + if(NSS_FOUND) + if(NSPR_FOUND) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${NSS_INCLUDE_DIR} -I${NSPR_INCLUDE_DIR}") + endif(NSPR_FOUND) + endif(NSS_FOUND) +endif(USE_NSS) if(${HAVE_ATOMIC_OPS}) set(EXTRALIBS @@ -550,7 +556,7 @@ install(TARGETS osdmaptool DESTINATION bin) set(ceph_authtool_srcs tools/ceph_authtool.cc) add_executable(ceph-authtool ${ceph_authtool_srcs}) -target_link_libraries(ceph-authtool global ${EXTRALIBS}) +target_link_libraries(ceph-authtool global ${EXTRALIBS} ${CRYPTO_LIBS}) install(TARGETS ceph-authtool DESTINATION bin) configure_file(${CMAKE_SOURCE_DIR}/src/ceph-coverage.in -- 2.47.3