File: FindFFMpeg.cmake

package info (click to toggle)
lightspark 0.7.2-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,912 kB
  • ctags: 9,614
  • sloc: cpp: 67,159; xml: 654; sh: 538; python: 357; asm: 308; makefile: 21
file content (41 lines) | stat: -rw-r--r-- 1,211 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# - Find libavcodec (FFMPEG)
# Find the native FFMPEG headers and libraries.
# Only grabs what Lightspark needs currently
#
#  FFMPEG_INCLUDE_DIRS - where to find avcodec.h
#  FFMPEG_LIBRARIES    - List of libraries when using ffmpeg
#  FFMPEG_FOUND        - True if ffmpeg found.

# Look for the header file.
FIND_PATH(FFMPEG_INCLUDE_DIR NAMES libavcodec/avcodec.h PATH_SUFFIXES ffmpeg)
MARK_AS_ADVANCED(FFMPEG_INCLUDE_DIR)

# Look for the library.
FIND_LIBRARY(FFMPEG_AVCODEC_LIBRARY NAMES 
    avcodec
)

FIND_LIBRARY(FFMPEG_AVUTIL_LIBRARY NAMES
    avutil
)

FIND_LIBRARY(FFMPEG_AVFORMAT_LIBRARY NAMES
    avformat
)

FIND_LIBRARY(FFMPEG_AVRESAMPLE_LIBRARY NAMES
    avresample
)

SET(FFMPEG_LIBRARY ${FFMPEG_AVCODEC_LIBRARY} ${FFMPEG_AVUTIL_LIBRARY} ${FFMPEG_AVFORMAT_LIBRARY} ${FFMPEG_AVRESAMPLE_LIBRARY})
MARK_AS_ADVANCED(FFMPEG_LIBRARY)

# handle the QUIETLY and REQUIRED arguments and set FFMPEG_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFMPEG DEFAULT_MSG FFMPEG_LIBRARY FFMPEG_INCLUDE_DIR)

IF(FFMPEG_FOUND)
  SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARY})
  SET(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR})
ENDIF(FFMPEG_FOUND)