-
Notifications
You must be signed in to change notification settings - Fork 48
/
CMakeLists.txt
375 lines (373 loc) · 17.9 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
PROJECT(sffmpeg)
CMAKE_MINIMUM_REQUIRED(VERSION 3.6)
INCLUDE(ExternalProject)
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_BINARY_DIR}/include)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lib)
SET(ENV{PATH} ${CMAKE_BINARY_DIR}/bin:$ENV{PATH})
SET(ENV{PKG_CONFIG_PATH} ${CMAKE_BINARY_DIR}/lib/pkgconfig)
EXTERNALPROJECT_ADD(
openssl
# URL https://www.openssl.org/source/openssl-1.1.1q.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/openssl-1.1.1q.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh openssl
CONFIGURE_COMMAND ./config no-shared no-idea no-mdc2 no-rc5 --prefix=${CMAKE_BINARY_DIR}
BUILD_COMMAND make depend && make -j${CONCURRENCY}
INSTALL_COMMAND make install_sw
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
opencore-amr
# URL https://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.6.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/opencore-amr-0.1.6.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh opencore-amr
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
fdkaac
# URL https://downloads.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-2.0.2.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/fdk-aac-2.0.2.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh fdkaac
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
lame
# URL https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/lame-3.100.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh lame
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libogg
# URL https://downloads.xiph.org/releases/ogg/libogg-1.3.5.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/libogg-1.3.5.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libogg
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
speex
DEPENDS libogg
# URL https://downloads.xiph.org/releases/speex/speex-1.2.1.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/speex-1.2.1.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh speex
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-sse --disable-oggtest --with-ogg=${CMAKE_BINARY_DIR}
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libvorbis
DEPENDS libogg
# URL https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/libvorbis-1.3.7.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libvorbis
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --disable-oggtest --with-ogg=${CMAKE_BINARY_DIR}
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libtheora
DEPENDS libogg
# URL https://downloads.xiph.org/releases/theora/libtheora-1.2.0alpha1.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/libtheora-1.2.0alpha1.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libtheora
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --disable-oggtest --disable-examples --with-ogg=${CMAKE_BINARY_DIR}
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
opus
# URL https://downloads.xiph.org/releases/opus/opus-1.3.1.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/opus-1.3.1.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh opus
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --disable-doc
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
nasm
# URL https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/nasm-2.15.05.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh nasm
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR}
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
xvidcore
DEPENDS nasm
# URL https://downloads.xvid.com/downloads/xvidcore-1.3.7.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/xvidcore-1.3.7.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh xvidcore
CONFIGURE_COMMAND cd build/generic && PATH=$ENV{PATH} ./configure --prefix=${CMAKE_BINARY_DIR}
BUILD_COMMAND cd build/generic && PATH=$ENV{PATH} make -j${CONCURRENCY}
INSTALL_COMMAND cd build/generic && make install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
x264
DEPENDS nasm
# GIT_REPOSITORY git://code.videolan.org/videolan/x264
URL ${CMAKE_SOURCE_DIR}/vendor/x264-20220602-0131-stable.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh x264
CONFIGURE_COMMAND PATH=$ENV{PATH} ./configure --prefix=${CMAKE_BINARY_DIR} --enable-static
BUILD_COMMAND PATH=$ENV{PATH} make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
x265
DEPENDS nasm
# URL https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/x265_3.5.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh x265
CONFIGURE_COMMAND cd build/linux && PATH=$ENV{PATH} cmake -G "Unix Makefiles" -D CMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR} -D ENABLE_CLI:BOOL=OFF -D ENABLE_SHARED:BOOL=OFF ../../source
BUILD_COMMAND cd build/linux && PATH=$ENV{PATH} make -j${CONCURRENCY}
INSTALL_COMMAND cd build/linux && PATH=$ENV{PATH} make install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
aom
DEPENDS nasm
# GIT_REPOSITORY git://aomedia.googlesource.com/aom.git
URL ${CMAKE_SOURCE_DIR}/vendor/aom-v3.3.0.tgz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh aom
CONFIGURE_COMMAND cd build && PATH=$ENV{PATH} cmake .. -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
BUILD_COMMAND cd build && PATH=$ENV{PATH} make -j${CONCURRENCY}
INSTALL_COMMAND cd build && PATH=$ENV{PATH} make install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libvpx
DEPENDS nasm
# URL https://github.com/webmproject/libvpx/archive/refs/tags/v1.12.0.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/libvpx-1.12.0.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libvpx
CONFIGURE_COMMAND PATH=$ENV{PATH} ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_COMMAND PATH=$ENV{PATH} make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
srt
DEPENDS openssl
# URL https://github.com/Haivision/srt/archive/refs/tags/v1.5.0.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/srt-v1.5.0.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh srt
CONFIGURE_COMMAND mkdir -p build && cd build && PATH=$ENV{PATH} PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} cmake -DENABLE_SHARED=0 -DENABLE_APPS=0 -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} ..
BUILD_COMMAND cd build && PATH=$ENV{PATH} make -j${CONCURRENCY}
INSTALL_COMMAND cd build && PATH=$ENV{PATH} make install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
zlib
# URL https://github.com/madler/zlib/archive/refs/tags/v1.2.12.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/zlib-v1.2.12.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh zlib
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --static
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libpng
DEPENDS zlib
# URL https://download.sourceforge.net/libpng/libpng-1.6.37.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/libpng-1.6.37.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libpng
CONFIGURE_COMMAND CFLAGS=-I${CMAKE_BINARY_DIR}/include CPPFLAGS=-I${CMAKE_BINARY_DIR}/include LDFLAGS=-L${CMAKE_BINARY_DIR}/lib ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
freetype
DEPENDS libpng zlib
# URL https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/freetype-2.12.1.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh freetype
CONFIGURE_COMMAND PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static --with-zlib
BUILD_COMMAND make -j${CONCURRENCY}
INSTALL_COMMAND make install && ln -s ${CMAKE_BINARY_DIR}/include/freetype2 ${CMAKE_BINARY_DIR}/include/freetype2/freetype
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
fribidi
# URL https://github.com/fribidi/fribidi/releases/download/v1.0.12/fribidi-1.0.12.tar.xz
URL ${CMAKE_SOURCE_DIR}/vendor/fribidi-1.0.12.tar.xz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh fribidi
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
expat
# URL https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.xz
URL ${CMAKE_SOURCE_DIR}/vendor/expat-2.4.8.tar.xz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh expat
CONFIGURE_COMMAND PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
gperf
# URL http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/gperf-3.1.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
fontconfig
DEPENDS freetype expat gperf
# URL https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.14.0.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/fontconfig-2.14.0.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh fontconfig
CONFIGURE_COMMAND PATH=$ENV{PATH} PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND PATH=$ENV{PATH} make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
harfbuzz
DEPENDS fontconfig
# URL https://github.com/harfbuzz/harfbuzz/releases/download/5.1.0/harfbuzz-5.1.0.tar.xz
URL ${CMAKE_SOURCE_DIR}/vendor/harfbuzz-5.1.0.tar.xz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh harfbuzz
CONFIGURE_COMMAND PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libass
DEPENDS nasm fribidi harfbuzz
# URL https://github.com/libass/libass/releases/download/0.16.0/libass-0.16.0.tar.xz
URL ${CMAKE_SOURCE_DIR}/vendor/libass-0.16.0.tar.xz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libass
CONFIGURE_COMMAND PATH=$ENV{PATH} PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND PATH=$ENV{PATH} make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libtool
# URL https://ftpmirror.gnu.org/libtool/libtool-2.4.7.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/libtool-2.4.7.tar.gz
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
zimg
DEPENDS nasm libtool
# URL https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.4.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/zimg-3.0.4.tar.gz
CONFIGURE_COMMAND PATH=$ENV{PATH} ACLOCAL_PATH=${CMAKE_BINARY_DIR}/share/aclocal ./autogen.sh && ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --enable-static
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
xorg-macros
# URL https://github.com/freedesktop/xorg-macros/archive/refs/tags/util-macros-1.19.1.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/xorg-macros-1.19.1.tar.gz
CONFIGURE_COMMAND PATH=$ENV{PATH} ./autogen.sh && ./configure --prefix=${CMAKE_BINARY_DIR}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libpciaccess
DEPENDS xorg-macros libtool
# URL https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/archive/libpciaccess-0.16/libpciaccess-libpciaccess-0.16.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/libpciaccess-0.16.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libpciaccess
CONFIGURE_COMMAND PATH=$ENV{PATH} ACLOCAL_PATH=${CMAKE_BINARY_DIR}/share/aclocal ./autogen.sh && CFLAGS=-fPIC ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libdrm
DEPENDS libpciaccess
# URL https://dri.freedesktop.org/libdrm/libdrm-2.4.100.tar.bz2
URL ${CMAKE_SOURCE_DIR}/vendor/libdrm-2.4.100.tar.bz2
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libdrm
CONFIGURE_COMMAND PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} CFLAGS=-fPIC ./configure --prefix=${CMAKE_BINARY_DIR} --disable-vmwgfx --disable-radeon --disable-amdgpu --disable-nouveau --disable-shared
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libva
DEPENDS libdrm
# URL https://github.com/intel/libva/releases/download/2.15.0/libva-2.15.0.tar.bz2
URL ${CMAKE_SOURCE_DIR}/vendor/intel-libva-2.15.0.tar.bz2
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libva
CONFIGURE_COMMAND PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} CFLAGS=-fPIC ./configure --prefix=${CMAKE_BINARY_DIR} --disable-shared --with-drivers-path=/usr/local/lib/dri
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
gmmlib
# URL https://github.com/intel/gmmlib/archive/refs/tags/intel-gmmlib-22.1.7.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/intel-gmmlib-22.1.7.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh gmmlib
CONFIGURE_COMMAND mkdir -p build && cd build && PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} cmake -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_BINARY_DIR}/include -DCMAKE_INSTALL_LIBDIR=${CMAKE_BINARY_DIR}/lib ..
BUILD_COMMAND cd build && make -j${CONCURRENCY}
INSTALL_COMMAND cd build && make install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
intel-media-driver
DEPENDS libva gmmlib
# URL https://github.com/intel/media-driver/archive/refs/tags/intel-media-22.4.4.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/intel-media-driver-22.4.4.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh intel-media-driver
CONFIGURE_COMMAND mkdir -p build && cd build && PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} cmake -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} -DLIBVA_DRIVERS_PATH=${CMAKE_BINARY_DIR}/lib/dri -DMEDIA_RUN_TEST_SUITE=0 ..
BUILD_COMMAND cd build && make -j${CONCURRENCY}
INSTALL_COMMAND cd build && make install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
intel-media-sdk
DEPENDS intel-media-driver
# URL https://github.com/Intel-Media-SDK/MediaSDK/archive/refs/tags/intel-mediasdk-22.4.4.tar.gz
URL ${CMAKE_SOURCE_DIR}/vendor/intel-media-sdk-22.4.4.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh intel-media-sdk
CONFIGURE_COMMAND mkdir -p build && cd build && PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} cmake -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} -DMFX_MODULES_DIR=/usr/local/lib -DMFX_PLUGINS_CONF_DIR=/usr/local/lib/mfx -DMFX_PLUGINS_DIR=/usr/local/lib/mfx -DMFX_APPS_DIR=${CMAKE_BINARY_DIR} -DBUILD_TUTORIALS=OFF ..
BUILD_COMMAND cd build && make -j${CONCURRENCY}
INSTALL_COMMAND cd build && make install
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
gputop
DEPENDS intel-media-sdk
URL ${CMAKE_SOURCE_DIR}/vendor/gputop-22.4.4.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh gputop
CONFIGURE_COMMAND CFLAGS=-I${CMAKE_BINARY_DIR}/samples LDFLAGS=-L${CMAKE_BINARY_DIR}/samples ./configure --prefix=${CMAKE_BINARY_DIR}
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
libxcoder
URL ${CMAKE_SOURCE_DIR}/vendor/libxcoder-4.1.0-rc4.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh libxcoder
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR}
BUILD_COMMAND make -j${CONCURRENCY}
INSTALL_COMMAND make install && rm ${CMAKE_BINARY_DIR}/lib/libxcoder.so
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
ffmpeg
DEPENDS nasm zlib openssl opencore-amr fdkaac lame libogg opus speex libvorbis libtheora xvidcore x264 x265 aom libvpx srt freetype libass zimg intel-media-sdk libxcoder
# URL https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.bz2
URL ${CMAKE_SOURCE_DIR}/vendor/ffmpeg-5.1.2.tar.bz2
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh ffmpeg
CONFIGURE_COMMAND PATH=$ENV{PATH} PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} ./configure --prefix=${CMAKE_BINARY_DIR} --datadir=${CMAKE_BINARY_DIR}/etc --pkg-config-flags=--static --disable-shared --enable-static --enable-gpl --enable-version3 --enable-nonfree --enable-runtime-cpudetect --disable-doc --disable-debug --disable-ffplay --disable-indevs --disable-outdevs --extra-cflags=-I${CMAKE_BINARY_DIR}/include\ --static --extra-ldflags=-L${CMAKE_BINARY_DIR}/lib --extra-libs=-lvorbis\ -logg\ -lcrypto\ -lexpat\ -lharfbuzz\ -lfribidi\ -lz\ -ldrm\ -lpthread\ -lstdc++\ -lm\ -ldl\ -lrt --enable-openssl --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libx265 --enable-libaom --enable-libvpx --enable-libsrt --enable-libfontconfig --enable-libfreetype --enable-libass --enable-libzimg --enable-vaapi --enable-libmfx --enable-libxcoder --enable-ni_quadra --disable-filter=hwupload_ni_logan
BUILD_COMMAND PATH=$ENV{PATH} make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)
EXTERNALPROJECT_ADD(
frmxtract
DEPENDS ffmpeg libpng
URL ${CMAKE_SOURCE_DIR}/vendor/frmxtract-5.1.tar.gz
PATCH_COMMAND ${CMAKE_SOURCE_DIR}/patches/patch-manager.sh frmxtract
CONFIGURE_COMMAND A=E CC=${CMAKE_C_COMPILER} PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH} EXTRA_LIBS=libdrm ./configure --prefix=${CMAKE_BINARY_DIR}
BUILD_COMMAND make -j${CONCURRENCY}
BUILD_IN_SOURCE 1
)