[2a9de4]: config / cmake / Modules / NewCMake / FindFFMPEG.cmake  Maximize  Restore  History

Download this file

90 lines (73 with data), 2.1 kB

 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Find the FFmpeg library
#
# Sets
# FFMPEG_FOUND. If false, don't try to use ffmpeg
# FFMPEG_FOUND_SEVERAL. If true, there are several directories with headers (not only ../ffmpeg/)
# FFMPEG_INCLUDE_DIR
# FFMPEG_LIBRARIES
SET( FFMPEG_FOUND "NO" )
FIND_PATH( FFMPEG_INCLUDE1_DIR ffmpeg/avcodec.h
/usr/include
/usr/local/include
)
FIND_PATH( FFMPEG_INCLUDE2_DIR libavcodec/avcodec.h
/usr/include
/usr/local/include
)
IF( FFMPEG_INCLUDE1_DIR)
SET (FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE1_DIR} )
SET( FFMPEG_FOUND_SEVERAL "NO" )
ENDIF ( FFMPEG_INCLUDE1_DIR)
IF( FFMPEG_INCLUDE2_DIR)
SET (FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE2_DIR} )
SET( FFMPEG_FOUND_SEVERAL "YES" )
ENDIF ( FFMPEG_INCLUDE2_DIR)
IF( FFMPEG_INCLUDE_DIR )
FIND_PROGRAM( FFMPEG_CONFIG ffmpeg-config
/usr/bin
/usr/local/bin
${HOME}/bin
)
IF( FFMPEG_CONFIG )
EXEC_PROGRAM( ${FFMPEG_CONFIG} ARGS "--libs avformat" OUTPUT_VARIABLE FFMPEG_LIBS )
SET( FFMPEG_FOUND "YES" )
SET( FFMPEG_LIBRARIES "${FFMPEG_LIBS}" )
ELSE( FFMPEG_CONFIG )
FIND_LIBRARY( FFMPEG_avcodec_LIBRARY avcodec
/usr/lib
/usr/local/lib
/usr/lib64
/usr/local/lib64
)
FIND_LIBRARY( FFMPEG_avformat_LIBRARY avformat
/usr/lib
/usr/local/lib
/usr/lib64
/usr/local/lib64
)
FIND_LIBRARY( FFMPEG_avutil_LIBRARY avutil
/usr/lib
/usr/local/lib
/usr/lib64
/usr/local/lib64
)
FIND_LIBRARY( FFMPEG_swscale_LIBRARY swscale
/usr/lib
/usr/local/lib
/usr/lib64
/usr/local/lib64
)
IF( FFMPEG_avcodec_LIBRARY )
IF( FFMPEG_avformat_LIBRARY )
SET( FFMPEG_FOUND "YES" )
SET( FFMPEG_LIBRARIES ${FFMPEG_avformat_LIBRARY} ${FFMPEG_avcodec_LIBRARY} )
IF( FFMPEG_avutil_LIBRARY )
SET( FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_avutil_LIBRARY} )
ENDIF( FFMPEG_avutil_LIBRARY )
IF( FFMPEG_swscale_LIBRARY )
SET( FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_swscale_LIBRARY} )
ENDIF( FFMPEG_swscale_LIBRARY )
ENDIF( FFMPEG_avformat_LIBRARY )
ENDIF( FFMPEG_avcodec_LIBRARY )
ENDIF( FFMPEG_CONFIG )
ENDIF( FFMPEG_INCLUDE_DIR )

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks