FindMPEG.cmake 1.67 KB
Newer Older
1 2 3 4 5 6
#.rst:
# FindMPEG
# --------
#
# Find the native MPEG includes and library
#
7
# This module defines
8 9 10 11 12 13 14
#
# ::
#
#   MPEG_INCLUDE_DIR, where to find MPEG.h, etc.
#   MPEG_LIBRARIES, the libraries required to use MPEG.
#   MPEG_FOUND, If false, do not try to use MPEG.
#
15
# also defined, but not for general use are
16 17 18 19 20
#
# ::
#
#   MPEG_mpeg2_LIBRARY, where to find the MPEG library.
#   MPEG_vo_LIBRARY, where to find the vo library.
21

22 23 24 25 26 27 28 29 30 31
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
32
# (To distribute this file outside of CMake, substitute the full
33 34
#  License text for the above reference.)

35
find_path(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h
36 37 38
  /usr/local/livid
)

39
find_library(MPEG_mpeg2_LIBRARY mpeg2
40 41 42
  /usr/local/livid/mpeg2dec/libmpeg2/.libs
)

43
find_library( MPEG_vo_LIBRARY vo
44 45 46
  /usr/local/livid/mpeg2dec/libvo/.libs
)

47
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
48
# all listed variables are TRUE
49
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
50
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
51

52 53
if(MPEG_FOUND)
  set( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )
54
endif()
55

56
mark_as_advanced(MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)