Skip to content

Commit 87a6722

Browse files
authored
Merge pull request Streampunk#92 from k13-engineering/feature/pkg-config
Use pkg-config on linux to resolve ffmpeg link dependencies
2 parents d5f006c + fb69649 commit 87a6722

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
@@ -21,7 +21,9 @@
2121
"cflags_cc": [
2222
"-std=c++11",
2323
"-fexceptions"
24-
],
24+
]
25+
}],
26+
['OS!="win" and OS!="linux"', {
2527
"link_settings": {
2628
"libraries": [
2729
"-lavcodec",
@@ -74,6 +76,18 @@
7476
}
7577
]
7678
}],
79+
['OS=="linux"', {
80+
"libraries": [
81+
"<!(pkg-config --libs libavcodec)",
82+
"<!(pkg-config --libs libavdevice)",
83+
"<!(pkg-config --libs libavfilter)",
84+
"<!(pkg-config --libs libavformat)",
85+
"<!(pkg-config --libs libavutil)",
86+
"<!(pkg-config --libs libpostproc)",
87+
"<!(pkg-config --libs libswresample)",
88+
"<!(pkg-config --libs libswscale)"
89+
]
90+
}],
7791
['OS=="mac"', {
7892
"include_dirs" : [
7993
"/opt/homebrew/Cellar/ffmpeg/5.0/include"

0 commit comments

Comments
 (0)