summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-04-17 07:44:02 (GMT)
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-04-17 09:10:09 (GMT)
commit293d8aee07fb6390224244d1d874e9d01e79032f (patch)
treebd9979c462502e39dcd24285ebee25b4206804ef
parent172e93bd963848db88a58625d5104f1102c78312 (diff)
downloadCMake-293d8aee07fb6390224244d1d874e9d01e79032f.zip
CMake-293d8aee07fb6390224244d1d874e9d01e79032f.tar.gz
CMake-293d8aee07fb6390224244d1d874e9d01e79032f.tar.bz2
FindAVIFile: use find_package_handle_standard_args()
-rw-r--r--Modules/FindAVIFile.cmake20
1 files changed, 9 insertions, 11 deletions
diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake
index ff140f6..7272ba6 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)