root/OpenSceneGraph/trunk/CMakeModules/FindFFmpeg.cmake @ 9817

Revision 9817, 1.2 kB (checked in by robert, 5 years ago)

Added Cmake support for new ffmpeg plugin

RevLine 
[9817]1# Locate gdal
2# This module defines
3# FFMPEG_LIBRARIES
4# FFMPEG_FOUND, if false, do not try to link to gdal
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 modues
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_LIBRARIES
34        ${FFMPEG_LIBAVFORMAT_LIBRARIES}
35        ${FFMPEG_LIBAVDEVICE_LIBRARIES}
36        ${FFMPEG_LIBAVCODEC_LIBRARIES}
37        ${FFMPEG_LIBAVUTIL_LIBRARIES})
38   
39ENDIF(FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND)
40
41
Note: See TracBrowser for help on using the browser.