]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/CMakeLists.txt: fix build to work with nss 4003/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 15 Mar 2015 19:11:48 +0000 (20:11 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 7 May 2015 11:26:23 +0000 (13:26 +0200)
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 <danny.al-gaaf@bisect.de>
src/CMakeLists.txt

index ba52cecf29ddfd06d8da1999b50727ac71cd7b60..94b08e95bfafbf80319767787b6ec0981682e9bc 100644 (file)
@@ -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