ENH: add second failure message parameter to

FIND_PACKAGE_HANDLE_STANDARD_ARGS(), so cmake modules can specify their own
better failure messages. If the default is ok use "DEFAULT_MSG".
Do this also for FindBoost.cmake (#5349)

Alex
This commit is contained in:
Alexander Neundorf 2007-07-23 09:49:52 -04:00
parent dddbad259c
commit 13db5b578b
29 changed files with 55 additions and 54 deletions

View File

@ -24,7 +24,7 @@ FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15)
# handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL ASPELL_LIBRARIES ASPELL_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR)
MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES)

View File

@ -24,7 +24,7 @@ FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2 )
# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 DEFAULT_MSG BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
IF (BZIP2_FOUND)
INCLUDE(CheckLibraryExists)

View File

@ -65,7 +65,7 @@ IF(WIN32)
ENDIF(WIN32)
SET(BOOST_INCLUDE_PATH_DESCRIPTION "directory containing the boost include files. E.g /usr/local/include/boost-1_33_1 or c:\\boost\\include\\boost-1_33_1")
SET(BOOST_INCLUDE_PATH_DESCRIPTION "directory containing the boost include files, e.g. /usr/local/include/boost-1_33_1 or c:/boost/include/boost-1_33_1")
SET(BOOST_DIR_MESSAGE "Set the Boost_INCLUDE_DIR cmake cache entry to the ${BOOST_INCLUDE_PATH_DESCRIPTION}")
@ -103,8 +103,7 @@ FIND_PATH(Boost_INCLUDE_DIR NAMES boost/config.hpp PATH_SUFFIXES ${SUFFIX_FOR_PA
DOC "The ${BOOST_INCLUDE_PATH_DESCRIPTION}"
)
# Assume we didn't find it.
SET(Boost_FOUND 0)
SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
# Now try to get the include and library path.
IF(Boost_INCLUDE_DIR)
@ -133,25 +132,17 @@ IF(Boost_INCLUDE_DIR)
ENDIF(EXISTS "${Boost_LIBRARY_DIR}/stage/lib")
ENDIF(EXISTS "${Boost_LIBRARY_DIR}/lib")
IF(EXISTS "${Boost_INCLUDE_DIR}")
SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
# We have found boost. It is possible that the user has not
# compiled any libraries so we set Boost_FOUND to be true here.
SET(Boost_FOUND 1)
ENDIF(EXISTS "${Boost_INCLUDE_DIR}")
IF(Boost_LIBRARY_DIR AND EXISTS "${Boost_LIBRARY_DIR}")
SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR})
ENDIF(Boost_LIBRARY_DIR AND EXISTS "${Boost_LIBRARY_DIR}")
ENDIF(Boost_INCLUDE_DIR)
IF(NOT Boost_FOUND)
IF(NOT Boost_FIND_QUIETLY)
MESSAGE(STATUS "Boost was not found. ${BOOST_DIR_MESSAGE}")
ELSE(NOT Boost_FIND_QUIETLY)
IF(Boost_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}")
ENDIF(Boost_FIND_REQUIRED)
ENDIF(NOT Boost_FIND_QUIETLY)
ENDIF(NOT Boost_FOUND)
# We have found boost. It is possible that the user has not
# compiled any libraries so we set Boost_FOUND to be true here.
# handle the QUIETLY and REQUIRED arguments and set BOOST_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Boost "Boost was not found. ${BOOST_DIR_MESSAGE}" Boost_INCLUDE_DIR )
SET(Boost_FOUND ${BOOST_FOUND})
MARK_AS_ADVANCED(Boost_INCLUDE_DIR)

View File

@ -16,7 +16,7 @@ MARK_AS_ADVANCED(CURL_LIBRARY)
# 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)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)
IF(CURL_FOUND)
SET(CURL_LIBRARIES ${CURL_LIBRARY})

View File

@ -26,7 +26,7 @@ SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses CURSES_LIBRARY CURSES_INCLUDE_PATH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG CURSES_LIBRARY CURSES_INCLUDE_PATH)
MARK_AS_ADVANCED(

View File

@ -14,7 +14,7 @@ FIND_LIBRARY(EXPAT_LIBRARY NAMES expat)
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT EXPAT_LIBRARY EXPAT_INCLUDE_PATH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT DEFAULT_MSG EXPAT_LIBRARY EXPAT_INCLUDE_PATH)
# Copy the results to the output variables.
IF(EXPAT_FOUND)

View File

@ -22,7 +22,7 @@ SET(GNUPLOT ${GNUPLOT_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot GNUPLOT_EXECUTABLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot DEFAULT_MSG GNUPLOT_EXECUTABLE)
MARK_AS_ADVANCED( GNUPLOT_EXECUTABLE )

View File

@ -25,7 +25,7 @@ FIND_LIBRARY(HSPELL_LIBRARIES NAMES hspell )
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL HSPELL_LIBRARIES HSPELL_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL DEFAULT_MSG HSPELL_LIBRARIES HSPELL_INCLUDE_DIR)
MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)

View File

@ -15,7 +15,7 @@ FIND_LIBRARY(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG JPEG_LIBRARY JPEG_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR)
IF(JPEG_FOUND)
SET(JPEG_LIBRARIES ${JPEG_LIBRARY})

View File

@ -29,7 +29,7 @@ ENDIF (JASPER_INCLUDE_DIR AND JASPER_LIBRARY AND JPEG_LIBRARIES)
# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper JASPER_LIBRARY JASPER_INCLUDE_DIR JPEG_LIBRARIES)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper DEFAULT_MSG JASPER_LIBRARY JASPER_INCLUDE_DIR JPEG_LIBRARIES)
IF (JASPER_FOUND)
SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} )

View File

@ -40,7 +40,7 @@ INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES)

View File

@ -38,7 +38,7 @@ INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES)

View File

@ -22,7 +22,7 @@ FIND_LIBRARY( MPEG_vo_LIBRARY vo
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY)
IF(MPEG_FOUND)
SET( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )

View File

@ -23,7 +23,7 @@ FIND_LIBRARY( MPEG2_vo_LIBRARY vo
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
IF(MPEG2_FOUND)
SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}

View File

@ -22,7 +22,7 @@ ENDIF(UNIX)
# handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
MARK_AS_ADVANCED(

View File

@ -59,4 +59,4 @@ ENDIF(${OPENAL_INCLUDE_DIR} MATCHES ".framework")
# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)

View File

@ -39,6 +39,6 @@ ENDIF(ZLIB_FOUND)
# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PNG PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PNG DEFAULT_MSG PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )

View File

@ -1,20 +1,30 @@
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME VAR ... )
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
# This macro is intended to be used in FindXXX.cmake modules files.
# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
# it also sets the <UPPERCASED_NAME>_FOUND variable.
# The package is found if all variables listed are TRUE.
# Example:
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
#
# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set tto TRUE.
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
# independent whether QUIET was used or not.
# If it is found, the location is reported using the VAR argument, so
# If it is found, the location is reported using the VAR1 argument, so
# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
# If the second argument is DEFAULT_MSG, the message in the failure case will
# be "Could NOT find LibXml2", if you don't like this message you can specify
# your own custom failure message there.
MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
SET(_FAIL_MESSAGE "Could NOT find ${_NAME}")
ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
SET(_FAIL_MESSAGE "${_FAIL_MSG}")
ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _VAR1 )
STRING(TOUPPER ${_NAME} _NAME_UPPER)
SET(${_NAME_UPPER}_FOUND TRUE)
@ -34,10 +44,10 @@ MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _VAR1 )
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ELSE (${_NAME_UPPER}_FOUND)
IF (${_NAME}_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could NOT find ${_NAME}")
MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}")
ELSE (${_NAME}_FIND_REQUIRED)
IF (NOT ${_NAME}_FIND_QUIETLY)
MESSAGE(STATUS "Could NOT find ${_NAME}")
MESSAGE(STATUS "${_FAIL_MESSAGE}")
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ENDIF (${_NAME}_FIND_REQUIRED)
ENDIF (${_NAME_UPPER}_FOUND)

View File

@ -21,6 +21,6 @@ SET (PERL ${PERL_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl PERL_EXECUTABLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl DEFAULT_MSG PERL_EXECUTABLE)
MARK_AS_ADVANCED( PERL_EXECUTABLE )

View File

@ -55,7 +55,7 @@ FIND_LIBRARY(PERL_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set PERLLIBS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PerlLibs PERL_LIBRARY PERL_INCLUDE_PATH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PerlLibs DEFAULT_MSG PERL_LIBRARY PERL_INCLUDE_PATH)
MARK_AS_ADVANCED(

View File

@ -57,4 +57,4 @@ ENDIF(${PHYSFS_INCLUDE_DIR} MATCHES ".framework")
# handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)

View File

@ -22,4 +22,4 @@ FIND_PROGRAM(PYTHON_EXECUTABLE
# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp PYTHON_EXECUTABLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp DEFAULT_MSG PYTHON_EXECUTABLE)

View File

@ -83,7 +83,7 @@ SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs PYTHON_LIBRARIES PYTHON_INCLUDE_PATH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_PATH)
GET_TARGET_PROPERTY(_FIND_PYTHONLIBS_ALREADY_INCLUDED __FindPythonLibsHelper TYPE)

View File

@ -137,6 +137,6 @@ ENDIF(SDL_LIBRARY_TEMP)
# handle the QUIETLY and REQUIRED arguments and set SDL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL SDL_LIBRARY_TEMP)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL DEFAULT_MSG SDL_LIBRARY_TEMP)
MARK_AS_ADVANCED(SDL_LIBRARY_TEMP)

View File

@ -146,13 +146,13 @@ ENDIF(WIN32)
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL TCL_LIBRARY TCL_INCLUDE_PATH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)
SET(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
SET(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCLTK TCL_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_INCLUDE_PATH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCLTK DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_INCLUDE_PATH)
SET(TK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
SET(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TK TK_LIBRARY TK_INCLUDE_PATH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TK DEFAULT_MSG TK_LIBRARY TK_INCLUDE_PATH)
MARK_AS_ADVANCED(

View File

@ -15,7 +15,7 @@ FIND_LIBRARY(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF TIFF_LIBRARY TIFF_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR)
IF(TIFF_FOUND)
SET( TIFF_LIBRARIES ${TIFF_LIBRARY} )

View File

@ -35,6 +35,6 @@ FIND_PROGRAM(TCL_TCLSH
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh TCL_TCLSH)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh DEFAULT_MSG TCL_TCLSH)
MARK_AS_ADVANCED( TCL_TCLSH )

View File

@ -14,7 +14,7 @@ FIND_PROGRAM(WGET_EXECUTABLE
# handle the QUIETLY and REQUIRED arguments and set WGET_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Wget WGET_EXECUTABLE)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Wget DEFAULT_MSG WGET_EXECUTABLE)
MARK_AS_ADVANCED( WGET_EXECUTABLE )

View File

@ -19,7 +19,7 @@ FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
IF(ZLIB_FOUND)
SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )