FindAVIFile: use find_package_handle_standard_args()

This commit is contained in:
Kovarththanan Rajaratnam 2010-04-17 09:44:02 +02:00
parent 172e93bd96
commit 293d8aee07
1 changed files with 8 additions and 10 deletions

View File

@ -35,16 +35,14 @@ IF (UNIX)
ENDIF (UNIX)
SET (AVIFILE_FOUND "NO")
# 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_INCLUDE_DIR)
IF(AVIFILE_AVIPLAY_LIBRARY)
IF (AVIFILE_FOUND)
SET(AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY})
SET( AVIFILE_FOUND "YES" )
SET(AVIFILE_DEFINITIONS "")
ENDIF(AVIFILE_AVIPLAY_LIBRARY)
ENDIF(AVIFILE_INCLUDE_DIR)
ENDIF()
MARK_AS_ADVANCED(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)