From 293d8aee07fb6390224244d1d874e9d01e79032f Mon Sep 17 00:00:00 2001 From: Kovarththanan Rajaratnam Date: Sat, 17 Apr 2010 09:44:02 +0200 Subject: [PATCH] FindAVIFile: use find_package_handle_standard_args() --- Modules/FindAVIFile.cmake | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake index ff140f64c..7272ba64e 100644 --- a/Modules/FindAVIFile.cmake +++ b/Modules/FindAVIFile.cmake @@ -35,16 +35,14 @@ IF (UNIX) ENDIF (UNIX) -SET (AVIFILE_FOUND "NO") - -IF(AVIFILE_INCLUDE_DIR) - IF(AVIFILE_AVIPLAY_LIBRARY) - SET( AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY} ) - SET( AVIFILE_FOUND "YES" ) - SET( AVIFILE_DEFINITIONS "") - - ENDIF(AVIFILE_AVIPLAY_LIBRARY) -ENDIF(AVIFILE_INCLUDE_DIR) +# handle the QUIETLY and REQUIRED arguments and set AVIFILE_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(AVIFile DEFAULT_MSG AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY) +IF (AVIFILE_FOUND) + SET(AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY}) + SET(AVIFILE_DEFINITIONS "") +ENDIF() MARK_AS_ADVANCED(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)