]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: use the stock FindCURL.cmake 10178/head
authorKefu Chai <kchai@redhat.com>
Wed, 6 Jul 2016 17:09:35 +0000 (01:09 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 7 Jul 2016 15:26:02 +0000 (23:26 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
cmake/modules/Findlibcurl.cmake [deleted file]

index 3f3b095f960d4bb979c38852f1532d1d93f73cc5..a2c9a73732cfe552bac7656b2bd70b4a02044ba4 100644 (file)
@@ -273,7 +273,10 @@ find_package(keyutils REQUIRED)
 
 find_package(libuuid REQUIRED)
 
-find_package(libcurl REQUIRED)
+find_package(CURL REQUIRED)
+set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
+set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES})
+CHECK_SYMBOL_EXISTS(curl_multi_wait "curl.h" HAVE_CURL_MULTI_WAIT)
 
 # nss or cryptopp?
 option(WITH_NSS "Use NSS crypto and SSL implementations" ON)
diff --git a/cmake/modules/Findlibcurl.cmake b/cmake/modules/Findlibcurl.cmake
deleted file mode 100644 (file)
index 3010182..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# Try to find libcurl
-# Once done, this will define
-#
-# CURL_FOUND - system has curl
-# CURL_INCLUDE_DIR - the curl include directories
-# CURL_LIBRARIES - link these to use curl
-# HAVE_CURL_MULTI_WAIT - curl provides a curl_multi_wait() function
-
-if(CURL_INCLUDE_DIR AND CURL_LIBRARIES)
-       set(CURL_FIND_QUIETLY TRUE)
-endif(CURL_INCLUDE_DIR AND CURL_LIBRARIES)
-
-INCLUDE(CheckCXXSymbolExists)
-
-# include dir
-
-find_path(CURL_INCLUDE_DIR curl.h NO_DEFAULT_PATH PATHS
-  /usr/include
-  /usr/include/curl
-  /opt/local/include
-  /usr/local/include
-)
-
-
-# finally the library itself
-find_library(LIBCURL NAMES curl)
-set(CURL_LIBRARIES ${LIBCURL})
-
-
-# check curl/multi.h for curl_multi_wait()
-set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIR})
-set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARIES})
-CHECK_SYMBOL_EXISTS(curl_multi_wait "curl.h" HAVE_CURL_MULTI_WAIT)
-
-# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
-# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(libcurl DEFAULT_MSG CURL_LIBRARIES CURL_INCLUDE_DIR)
-
-mark_as_advanced(CURL_LIBRARIES CURL_INCLUDE_DIR HAVE_CURL_MULTI_WAIT)