root/OpenSceneGraph/branches/osg-cocoa-dev/CMakeModules/FindFFmpeg.cmake @ 9846

Revision 9846, 1.2 kB (checked in by shuber, 5 years ago)

merging from trunk using

svn merge -r 9837:9843 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk

Line 
1# Locate ffmpeg
2# This module defines
3# FFMPEG_LIBRARIES
4# FFMPEG_FOUND, if false, do not try to link to ffmpeg
5# FFMPEG_INCLUDE_DIR, where to find the headers
6#
7# $FFMPEG_DIR is an environment variable that would
8# correspond to the ./configure --prefix=$FFMPEG_DIR
9#
10# Created by Robert Osfield.
11
12#use pkg-config to find various modes
13INCLUDE(FindPkgConfig OPTIONAL)
14
15IF(PKG_CONFIG_FOUND)
16
17    INCLUDE(FindPkgConfig)
18
19    pkg_check_modules(FFMPEG_LIBAVFORMAT libavformat)
20    pkg_check_modules(FFMPEG_LIBAVDEVICE libavdevice)
21    pkg_check_modules(FFMPEG_LIBAVCODEC libavcodec)
22    pkg_check_modules(FFMPEG_LIBAVUTIL libavutil)
23
24ENDIF(PKG_CONFIG_FOUND)
25
26SET(FFMPEG_FOUND "NO")
27IF   (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND)
28   
29    SET(FFMPEG_FOUND "YES")
30
31    SET(FFMPEG_INCLUDE_DIRS ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
32
33    SET(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBAVFORMAT_LIBRARY_DIRS})
34
35    SET(FFMPEG_LIBRARIES
36        ${FFMPEG_LIBAVFORMAT_LIBRARIES}
37        ${FFMPEG_LIBAVDEVICE_LIBRARIES}
38        ${FFMPEG_LIBAVCODEC_LIBRARIES}
39        ${FFMPEG_LIBAVUTIL_LIBRARIES})
40   
41ENDIF(FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND)
42
43
Note: See TracBrowser for help on using the browser.