summaryrefslogtreecommitdiffstats
path: root/Modules/FindMPEG2.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-19 13:00:51 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-19 13:00:51 (GMT)
commitc7770b8edbff442267563bd3036cef8fdb0cc4a9 (patch)
tree1c73f377e04981e72043a9ac5fff8fef0eca343b /Modules/FindMPEG2.cmake
parentb6b1ebe2950e2437fffd4eecbe3f1992fc63e812 (diff)
downloadCMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.zip
CMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.tar.gz
CMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.tar.bz2
ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS() macro in most of the
not-too-complicated modules -remove unnecessary default search paths used in the FIND_XXX() calls Alex
Diffstat (limited to 'Modules/FindMPEG2.cmake')
-rw-r--r--Modules/FindMPEG2.cmake40
1 files changed, 18 insertions, 22 deletions
diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake
index 4b54fe3..06dd137 100644
--- a/Modules/FindMPEG2.cmake
+++ b/Modules/FindMPEG2.cmake
@@ -8,36 +8,32 @@
# MPEG2_vo_LIBRARY, where to find the vo library.
FIND_PATH(MPEG2_INCLUDE_DIR mpeg2.h
- /usr/local/include
- /usr/include
/usr/local/livid
)
FIND_LIBRARY(MPEG2_mpeg2_LIBRARY mpeg2
- /usr/local/lib
- /usr/lib
/usr/local/livid/mpeg2dec/libmpeg2/.libs
)
FIND_LIBRARY( MPEG2_vo_LIBRARY vo
- /usr/local/lib
- /usr/lib
/usr/local/livid/mpeg2dec/libvo/.libs
)
-SET( MPEG2_FOUND "NO" )
-IF(MPEG2_INCLUDE_DIR)
- IF(MPEG2_mpeg2_LIBRARY)
- SET( MPEG2_FOUND "YES" )
- SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
- ${MPEG2_vo_LIBRARY})
-
- #some native mpeg2 installations will depend
- #on libSDL, if found, add it in.
- INCLUDE( ${MODULE_PATH}/NewCMake/FindSDL.cmake )
- IF(SDL_FOUND)
- SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
- ENDIF(SDL_FOUND)
-
- ENDIF(MPEG2_mpeg2_LIBRARY)
-ENDIF(MPEG2_INCLUDE_DIR)
+
+# 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)
+
+IF(MPEG2_FOUND)
+ SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
+ ${MPEG2_vo_LIBRARY})
+
+ #some native mpeg2 installations will depend
+ #on libSDL, if found, add it in.
+ INCLUDE( FindSDL.cmake )
+ IF(SDL_FOUND)
+ SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
+ ENDIF(SDL_FOUND)
+ENDIF(MPEG2_FOUND)
+