ENH: fix bug where sharedforward would not work if there was a space in the path...
[cmake.git] / Modules / FindCURL.cmake
blob25a056aeddd1a28977e9466aba15e5a8c59692fe
1 # - Find curl
2 # Find the native CURL headers and libraries.
4 #  CURL_INCLUDE_DIRS - where to find curl/curl.h, etc.
5 #  CURL_LIBRARIES    - List of libraries when using curl.
6 #  CURL_FOUND        - True if curl found.
8 # Look for the header file.
9 FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h)
10 MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
12 # Look for the library.
13 FIND_LIBRARY(CURL_LIBRARY NAMES curl)
14 MARK_AS_ADVANCED(CURL_LIBRARY)
16 # handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if 
17 # all listed variables are TRUE
18 INCLUDE(FindPackageHandleStandardArgs)
19 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)
21 IF(CURL_FOUND)
22   SET(CURL_LIBRARIES ${CURL_LIBRARY})
23   SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
24 ELSE(CURL_FOUND)
25   SET(CURL_LIBRARIES)
26   SET(CURL_INCLUDE_DIRS)
27 ENDIF(CURL_FOUND)