comparison third_party/ffmpeg/BUILD @ 217:7ef4c9d2a72d hg-web

[DO NOT PUSH] Random values.
author MrJuneJune <me@mrjunejune.com>
date Sun, 25 Jan 2026 10:44:04 -0800
parents
children
comparison
equal deleted inserted replaced
192:b818a4561a3c 217:7ef4c9d2a72d
1 # Assumes ffmpeg is installed on the system (apt install ffmpeg / brew install ffmpeg)
2 load("@rules_cc//cc:cc_library.bzl", "cc_library")
3 load("@rules_cc//cc:cc_test.bzl", "cc_test")
4
5 cc_library(
6 name = "ffmpeg",
7 hdrs = ["ffmpeg.h"],
8 srcs = ["ffmpeg_wrapper.c"],
9 linkopts = select({
10 "@platforms//os:linux": [
11 "-lavcodec",
12 "-lavformat",
13 "-lavutil",
14 "-lswscale",
15 "-lswresample",
16 ],
17 "@platforms//os:macos": [
18 "-lavcodec",
19 "-lavformat",
20 "-lavutil",
21 "-lswscale",
22 "-lswresample",
23 ],
24 "//conditions:default": [],
25 }),
26 copts = select({
27 "@platforms//os:linux": ["-I/usr/include/ffmpeg"],
28 "@platforms//os:macos": ["-I/opt/homebrew/include", "-I/usr/local/include"],
29 "//conditions:default": [],
30 }),
31 visibility = ["//visibility:public"],
32 )
33
34 # For projects that just need to shell out to ffmpeg CLI
35 cc_library(
36 name = "ffmpeg_cli",
37 hdrs = ["ffmpeg_cli.h"],
38 srcs = ["ffmpeg_cli.c"],
39 visibility = ["//visibility:public"],
40 )