BUG: honor REQUIRED and QUIETLY (#5312)

Alex
This commit is contained in:
Alexander Neundorf 2007-07-12 11:05:57 -04:00
parent 1f28b3b469
commit a5be2b7782
1 changed files with 13 additions and 9 deletions

View File

@ -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)
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(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)
ENDIF(NOT CURL_FIND_QUIETLY)
ENDIF(NOT CURL_FOUND)
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)