From a5be2b77823d6dd2ce1fd6859eb037dd2c939134 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 12 Jul 2007 11:05:57 -0400 Subject: BUG: honor REQUIRED and QUIETLY (#5312) Alex --- Modules/FindCURL.cmake | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake index 57c1bbc..37587ca 100644 --- a/Modules/FindCURL.cmake +++ b/Modules/FindCURL.cmake @@ -25,14 +25,18 @@ ELSE(CURL_INCLUDE_DIR AND CURL_LIBRARY) ENDIF(CURL_INCLUDE_DIR AND CURL_LIBRARY) # Report the results. -IF(NOT CURL_FOUND) - SET(CURL_DIR_MESSAGE - "CURL was not found. Make sure CURL_LIBRARY and CURL_INCLUDE_DIR are set.") +IF(CURL_FOUND) IF(NOT CURL_FIND_QUIETLY) - MESSAGE(STATUS "${CURL_DIR_MESSAGE}") - ELSE(NOT CURL_FIND_QUIETLY) - IF(CURL_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "${CURL_DIR_MESSAGE}") - ENDIF(CURL_FIND_REQUIRED) + MESSAGE(STATUS "CURL found: ${CURL_LIBRARIES}") ENDIF(NOT CURL_FIND_QUIETLY) -ENDIF(NOT CURL_FOUND) +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) -- cgit v0.12