Introduce "generator expressions" to add_test()
[cmake.git] / Modules / FindMPEG2.cmake
bloba2477f229d1237e5cae2a0596eb67428cc121ab6
1 # - Find the native MPEG2 includes and library
2 # This module defines
3 #  MPEG2_INCLUDE_DIR, path to mpeg2dec/mpeg2.h, etc.
4 #  MPEG2_LIBRARIES, the libraries required to use MPEG2.
5 #  MPEG2_FOUND, If false, do not try to use MPEG2.
6 # also defined, but not for general use are
7 #  MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library.
8 #  MPEG2_vo_LIBRARY, where to find the vo library.
10 FIND_PATH(MPEG2_INCLUDE_DIR 
11   NAMES mpeg2.h mpeg2dec/mpeg2.h
12   PATHS /usr/local/livid
15 FIND_LIBRARY(MPEG2_mpeg2_LIBRARY mpeg2
16   /usr/local/livid/mpeg2dec/libmpeg2/.libs
19 FIND_LIBRARY( MPEG2_vo_LIBRARY vo
20   /usr/local/livid/mpeg2dec/libvo/.libs
24 # handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if 
25 # all listed variables are TRUE
26 INCLUDE(FindPackageHandleStandardArgs)
27 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
29 IF(MPEG2_FOUND)
30   SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY} 
31                         ${MPEG2_vo_LIBRARY})
33   #some native mpeg2 installations will depend
34   #on libSDL, if found, add it in.
35   INCLUDE( FindSDL )
36   IF(SDL_FOUND)
37     SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
38   ENDIF(SDL_FOUND)
39 ENDIF(MPEG2_FOUND)
41 MARK_AS_ADVANCED(MPEG2_INCLUDE_DIR MPEG2_mpeg2_LIBRARY MPEG2_vo_LIBRARY)