Skip to content

Commit fb69649

Browse files
committed
Use pkg-config on linux to resolve ffmpeg link dependencies
1 parent aee5ff9 commit fb69649

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

binding.gyp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"cflags_cc": [
2121
"-std=c++11",
2222
"-fexceptions"
23-
],
23+
]
24+
}],
25+
['OS!="win" and OS!="linux"', {
2426
"link_settings": {
2527
"libraries": [
2628
"-lavcodec",
@@ -73,6 +75,18 @@
7375
}
7476
]
7577
}],
78+
['OS=="linux"', {
79+
"libraries": [
80+
"<!(pkg-config --libs libavcodec)",
81+
"<!(pkg-config --libs libavdevice)",
82+
"<!(pkg-config --libs libavfilter)",
83+
"<!(pkg-config --libs libavformat)",
84+
"<!(pkg-config --libs libavutil)",
85+
"<!(pkg-config --libs libpostproc)",
86+
"<!(pkg-config --libs libswresample)",
87+
"<!(pkg-config --libs libswscale)"
88+
]
89+
}],
7690
['OS=="mac"', {
7791
"include_dirs" : [
7892
"/opt/homebrew/Cellar/ffmpeg/5.0/include"

0 commit comments

Comments
 (0)