-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
55 lines (40 loc) · 1.01 KB
/
CMakeLists.txt
File metadata and controls
55 lines (40 loc) · 1.01 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
cmake_minimum_required(VERSION 3.25)
find_package(cmake-bare REQUIRED PATHS node_modules/cmake-bare)
find_package(cmake-harden REQUIRED PATHS node_modules/cmake-harden)
find_package(cmake-ports REQUIRED PATHS node_modules/cmake-ports)
project(bare_ffmpeg C CXX)
option(BARE_FFMPEG_ENABLE_GPL "Enable GPL-licensed features (e.g., x264)" OFF)
fetch_package("github:holepunchto/libjstl#098664c")
set(ffmpeg_features dav1d svt-av1 opus vpx)
if(BARE_FFMPEG_ENABLE_GPL)
list(APPEND ffmpeg_features gpl x264)
endif()
find_port(ffmpeg FEATURES ${ffmpeg_features})
set(install_targets)
if(LINUX)
list(APPEND install_targets TARGET va TARGET va-drm)
endif()
add_bare_module(bare_ffmpeg INSTALL ${install_targets})
harden(${bare_ffmpeg})
target_sources(
${bare_ffmpeg}
PRIVATE
binding.cc
)
set(link_libraries
avcodec
avdevice
avformat
avutil
swresample
swscale
jstl
)
if(LINUX)
list(APPEND link_libraries va va-drm)
endif()
target_link_libraries(
${bare_ffmpeg}
PRIVATE
${link_libraries}
)