forked from pyke369/sffmpeg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
103 lines (101 loc) · 4.24 KB
/
CMakeLists.txt
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
PROJECT(ffmpeg)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
INCLUDE(ExternalProject)
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_BINARY_DIR}/include)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lib)
EXTERNALPROJECT_ADD(
z
URL http://zlib.net/zlib-1.2.5.tar.gz
PATCH_COMMAND patch Makefile.in ${CMAKE_SOURCE_DIR}/vendor/zlib-1.2.5-static.patch
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --static
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
openssl
URL http://www.openssl.org/source/openssl-1.0.0e.tar.gz
CONFIGURE_COMMAND ./config no-shared no-idea no-mdc2 no-rc5 --prefix=${CMAKE_BINARY_DIR}
BUILD_COMMAND make depend && make
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
opencore
URL http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
faac
URL http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --without-mp4v2
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
mp3lame
URL http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
ogg
URL http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
speex
DEPENDS ogg
URL http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-sse --disable-oggtest --with-ogg=${CMAKE_BINARY_DIR}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
vorbis
DEPENDS ogg
URL http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --disable-oggtest
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
theora
DEPENDS ogg
URL http://downloads.xiph.org/releases/theora/libtheora-1.2.0alpha1.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --disable-oggtest --disable-examples --with-ogg=${CMAKE_BINARY_DIR}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
xvidcore
URL http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
CONFIGURE_COMMAND cd build/generic && ./configure --prefix=${CMAKE_BINARY_DIR}
BUILD_COMMAND cd build/generic && make
INSTALL_COMMAND cd build/generic && make install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
x264
URL ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --enable-static
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
vpx
URL http://webm.googlecode.com/files/libvpx-v0.9.7-p1.tar.bz2
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
rtmp
DEPENDS z openssl
GIT_REPOSITORY git://git.ffmpeg.org/rtmpdump
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/vendor/rtmpdump-2.4-prefix.patch
CONFIGURE_COMMAND ""
BUILD_COMMAND make PREFIX=${CMAKE_BINARY_DIR} SHARED= XCFLAGS=-I${CMAKE_BINARY_DIR}/include XLDFLAGS=-L${CMAKE_BINARY_DIR}/lib XLIBS=-ldl
INSTALL_COMMAND make PREFIX=${CMAKE_BINARY_DIR} SHARED= install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
ffmpeg
DEPENDS opencore faac mp3lame ogg speex vorbis theora xvidcore x264 vpx rtmp
URL http://www.ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
CONFIGURE_COMMAND PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/lib/pkgconfig ./configure --prefix=${CMAKE_BINARY_DIR} --datadir=${CMAKE_BINARY_DIR}/etc --disable-shared --enable-static --enable-gpl --enable-version3 --enable-nonfree --disable-doc --disable-debug --disable-ffplay --disable-ffserver --disable-avdevice --disable-indevs --disable-outdevs --enable-runtime-cpudetect --enable-memalign-hack --extra-cflags=-I${CMAKE_BINARY_DIR}/include\ --static --extra-ldflags=-L${CMAKE_BINARY_DIR}/lib\ -static --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libvpx --enable-librtmp
BUILD_IN_SOURCE 1
)