1 # - Find the native MPEG2 includes and library
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 #=============================================================================
11 # Copyright 2003-2009 Kitware, Inc.
13 # Distributed under the OSI-approved BSD License (the "License");
14 # see accompanying file Copyright.txt for details.
16 # This software is distributed WITHOUT ANY WARRANTY; without even the
17 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 # See the License for more information.
19 #=============================================================================
20 # (To distribute this file outside of CMake, substitute the full
21 # License text for the above reference.)
23 find_path(MPEG2_INCLUDE_DIR
24 NAMES mpeg2.h mpeg2dec/mpeg2.h
25 PATHS /usr/local/livid
28 find_library(MPEG2_mpeg2_LIBRARY mpeg2
29 /usr/local/livid/mpeg2dec/libmpeg2/.libs
32 find_library( MPEG2_vo_LIBRARY vo
33 /usr/local/livid/mpeg2dec/libvo/.libs
37 # handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
38 # all listed variables are TRUE
39 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
40 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
43 set( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
46 #some native mpeg2 installations will depend
47 #on libSDL, if found, add it in.
50 set( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
54 mark_as_advanced(MPEG2_INCLUDE_DIR MPEG2_mpeg2_LIBRARY MPEG2_vo_LIBRARY)