summaryrefslogtreecommitdiffstats
path: root/Modules/FindCURL.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-19 13:00:51 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-19 13:00:51 (GMT)
commitc7770b8edbff442267563bd3036cef8fdb0cc4a9 (patch)
tree1c73f377e04981e72043a9ac5fff8fef0eca343b /Modules/FindCURL.cmake
parentb6b1ebe2950e2437fffd4eecbe3f1992fc63e812 (diff)
downloadCMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.zip
CMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.tar.gz
CMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.tar.bz2
ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS() macro in most of the
not-too-complicated modules -remove unnecessary default search paths used in the FIND_XXX() calls Alex
Diffstat (limited to 'Modules/FindCURL.cmake')
-rw-r--r--Modules/FindCURL.cmake29
1 files changed, 7 insertions, 22 deletions
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index 37587ca..b079307 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -13,30 +13,15 @@ MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
FIND_LIBRARY(CURL_LIBRARY NAMES curl)
MARK_AS_ADVANCED(CURL_LIBRARY)
-# Copy the results to the output variables.
-IF(CURL_INCLUDE_DIR AND CURL_LIBRARY)
- SET(CURL_FOUND 1)
+# 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(CURL CURL_LIBRARY CURL_INCLUDE_DIR)
+
+IF(CURL_FOUND)
SET(CURL_LIBRARIES ${CURL_LIBRARY})
SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
-ELSE(CURL_INCLUDE_DIR AND CURL_LIBRARY)
- SET(CURL_FOUND 0)
+ELSE(CURL_FOUND)
SET(CURL_LIBRARIES)
SET(CURL_INCLUDE_DIRS)
-ENDIF(CURL_INCLUDE_DIR AND CURL_LIBRARY)
-
-# Report the results.
-IF(CURL_FOUND)
- IF(NOT CURL_FIND_QUIETLY)
- MESSAGE(STATUS "CURL found: ${CURL_LIBRARIES}")
- ENDIF(NOT CURL_FIND_QUIETLY)
-ELSE(CURL_FOUND)
- SET(CURL_DIR_MESSAGE
- "CURL was not found. Make sure CURL_LIBRARY and CURL_INCLUDE_DIR are set.")
- IF(CURL_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "${CURL_DIR_MESSAGE}")
- ELSE(CURL_FIND_REQUIRED)
- IF(NOT CURL_FIND_QUIETLY)
- MESSAGE(STATUS "${CURL_DIR_MESSAGE}")
- ENDIF(NOT CURL_FIND_QUIETLY)
- ENDIF(CURL_FIND_REQUIRED)
ENDIF(CURL_FOUND)