Added Cmake support for new ffmpeg plugin

This commit is contained in:
Robert Osfield 2009-02-25 16:05:12 +00:00
parent 6680ee2b10
commit 1bad5770b6
3 changed files with 46 additions and 0 deletions

View File

@ -311,6 +311,7 @@ FIND_PACKAGE(ITK)
FIND_PACKAGE(LibVNCServer)
FIND_PACKAGE(OurDCMTK)
FIND_PACKAGE(XUL)
FIND_PACKAGE(FFmpeg)
#use pkg-config to find various modues
INCLUDE(FindPkgConfig OPTIONAL)

View File

@ -0,0 +1,41 @@
# Locate gdal
# This module defines
# FFMPEG_LIBRARIES
# FFMPEG_FOUND, if false, do not try to link to gdal
# FFMPEG_INCLUDE_DIR, where to find the headers
#
# $FFMPEG_DIR is an environment variable that would
# correspond to the ./configure --prefix=$FFMPEG_DIR
#
# Created by Robert Osfield.
#use pkg-config to find various modues
INCLUDE(FindPkgConfig OPTIONAL)
IF(PKG_CONFIG_FOUND)
INCLUDE(FindPkgConfig)
pkg_check_modules(FFMPEG_LIBAVFORMAT libavformat)
pkg_check_modules(FFMPEG_LIBAVDEVICE libavdevice)
pkg_check_modules(FFMPEG_LIBAVCODEC libavcodec)
pkg_check_modules(FFMPEG_LIBAVUTIL libavutil)
ENDIF(PKG_CONFIG_FOUND)
SET(FFMPEG_FOUND "NO")
IF (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND)
SET(FFMPEG_FOUND "YES")
SET(FFMPEG_INCLUDE_DIRS ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
SET(FFMPEG_LIBRARIES
${FFMPEG_LIBAVFORMAT_LIBRARIES}
${FFMPEG_LIBAVDEVICE_LIBRARIES}
${FFMPEG_LIBAVCODEC_LIBRARIES}
${FFMPEG_LIBAVUTIL_LIBRARIES})
ENDIF(FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVDEVICE_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND)

View File

@ -196,6 +196,10 @@ IF(XINE_FOUND)
ADD_SUBDIRECTORY(xine)
ENDIF(XINE_FOUND)
IF(FFMPEG_FOUND)
ADD_SUBDIRECTORY(ffmpeg)
ENDIF(FFMPEG_FOUND)
IF(QUICKTIME_FOUND)
ADD_SUBDIRECTORY(quicktime)
ENDIF(QUICKTIME_FOUND)