STYLE: Nightly Version update
[cmake.git] / Modules / FindMPEG2.cmake
blob21e0724c9a44ae2c79223ea57ff715218cfb21fb
2 # Find the native MPEG2 includes and library
4 # This module defines
5 # MPEG2_INCLUDE_DIR, where to find mpeg2dec/mpeg2.h, etc.
6 # MPEG2_LIBRARIES, the libraries to link against to use MPEG2.
7 # MPEG2_FOUND, If false, do not try to use MPEG2.
9 # also defined, but not for general use are
10 # MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library.
11 # MPEG2_vo_LIBRARY, where to find the vo library.
13 FIND_PATH(MPEG2_INCLUDE_DIR mpeg2.h
14   /usr/local/include
15   /usr/include
16   /usr/local/livid
19 FIND_LIBRARY(MPEG2_mpeg2_LIBRARY mpeg2
20   /usr/local/lib
21   /usr/lib
22   /usr/local/livid/mpeg2dec/libmpeg2/.libs
25 FIND_LIBRARY( MPEG2_vo_LIBRARY vo
26   /usr/local/lib
27   /usr/lib
28   /usr/local/livid/mpeg2dec/libvo/.libs
31 SET( MPEG2_FOUND "NO" )
32 IF(MPEG2_INCLUDE_DIR)
33   IF(MPEG2_mpeg2_LIBRARY)
34     SET( MPEG2_FOUND "YES" )
35     SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY} 
36                          ${MPEG2_vo_LIBRARY})
38     #some native mpeg2 installations will depend
39     #on libSDL, if found, add it in.
40     INCLUDE( ${MODULE_PATH}/NewCMake/FindSDL.cmake )
41     IF(SDL_FOUND)
42       SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
43     ENDIF(SDL_FOUND)
45   ENDIF(MPEG2_mpeg2_LIBRARY)
46 ENDIF(MPEG2_INCLUDE_DIR)