Imported Upstream version 2.8.10.2
[platform/upstream/cmake.git] / Modules / FindMPEG.cmake
1 # - Find the native MPEG includes and library
2 # This module defines
3 #  MPEG_INCLUDE_DIR, where to find MPEG.h, etc.
4 #  MPEG_LIBRARIES, the libraries required to use MPEG.
5 #  MPEG_FOUND, If false, do not try to use MPEG.
6 # also defined, but not for general use are
7 #  MPEG_mpeg2_LIBRARY, where to find the MPEG library.
8 #  MPEG_vo_LIBRARY, where to find the vo library.
9
10 #=============================================================================
11 # Copyright 2002-2009 Kitware, Inc.
12 #
13 # Distributed under the OSI-approved BSD License (the "License");
14 # see accompanying file Copyright.txt for details.
15 #
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.)
22
23 find_path(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h
24   /usr/local/livid
25 )
26
27 find_library(MPEG_mpeg2_LIBRARY mpeg2
28   /usr/local/livid/mpeg2dec/libmpeg2/.libs
29 )
30
31 find_library( MPEG_vo_LIBRARY vo
32   /usr/local/livid/mpeg2dec/libvo/.libs
33 )
34
35 # handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
36 # all listed variables are TRUE
37 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
38 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
39
40 if(MPEG_FOUND)
41   set( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )
42 endif()
43
44 mark_as_advanced(MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)