ENH: fix bug where sharedforward would not work if there was a space in the path...
[cmake.git] / Modules / FindMPEG2.cmake
blob0ce75f5cd9797f1e8c1e45a829a85abe1efde476
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 mpeg2.h
11   /usr/local/livid
14 FIND_LIBRARY(MPEG2_mpeg2_LIBRARY mpeg2
15   /usr/local/livid/mpeg2dec/libmpeg2/.libs
18 FIND_LIBRARY( MPEG2_vo_LIBRARY vo
19   /usr/local/livid/mpeg2dec/libvo/.libs
23 # handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if 
24 # all listed variables are TRUE
25 INCLUDE(FindPackageHandleStandardArgs)
26 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
28 IF(MPEG2_FOUND)
29   SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY} 
30                         ${MPEG2_vo_LIBRARY})
32   #some native mpeg2 installations will depend
33   #on libSDL, if found, add it in.
34   INCLUDE( FindSDL.cmake )
35   IF(SDL_FOUND)
36     SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
37   ENDIF(SDL_FOUND)
38 ENDIF(MPEG2_FOUND)