-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbinding.gyp
More file actions
82 lines (82 loc) · 2.52 KB
/
binding.gyp
File metadata and controls
82 lines (82 loc) · 2.52 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
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
{
"targets": [
{
"target_name": "webcodecs_node",
"sources": [
"native/binding.cpp",
"native/frame.cpp",
"native/audio.cpp",
"native/encoder.cpp",
"native/decoder.cpp",
"native/async_encoder.cpp",
"native/async_decoder.cpp",
"native/capability_probe.cpp",
"native/util.cpp",
"native/hw_accel.cpp",
"native/image_decoder.cpp",
"native/color.cpp",
"native/svc.cpp"
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")",
"<!@(pkg-config --cflags-only-I libavcodec libavutil libswscale libswresample | sed 's/-I//g')"
],
"libraries": [
"<!@(pkg-config --libs libavcodec libavutil libswscale libswresample)"
],
"cflags!": ["-fno-exceptions"],
"cflags_cc!": ["-fno-exceptions"],
"cflags_cc": ["-std=c++17"],
"defines": ["NAPI_DISABLE_CPP_EXCEPTIONS"],
"conditions": [
["OS=='mac'", {
"defines": ["__APPLE__"],
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"CLANG_CXX_LIBRARY": "libc++",
"MACOSX_DEPLOYMENT_TARGET": "10.15",
"OTHER_CFLAGS": [
"-std=c++17",
"<!@(pkg-config --cflags libavcodec libavutil libswscale libswresample)"
],
"OTHER_LDFLAGS": [
"<!@(pkg-config --libs libavcodec libavutil libswscale libswresample)",
"-framework VideoToolbox",
"-framework CoreMedia",
"-framework CoreVideo",
"-framework CoreFoundation"
]
}
}],
["OS=='linux'", {
"defines": ["__linux__"],
"cflags": [
"-std=c++17",
"<!@(pkg-config --cflags libavcodec libavutil libswscale libswresample)"
],
"ldflags": [
"<!@(pkg-config --libs libavcodec libavutil libswscale libswresample)"
]
}],
["OS=='win'", {
"defines": ["_WIN32"],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1,
"AdditionalOptions": ["/std:c++17"]
}
},
"include_dirs": [
"$(FFMPEG_DIR)/include"
],
"libraries": [
"-l$(FFMPEG_DIR)/lib/avcodec",
"-l$(FFMPEG_DIR)/lib/avutil",
"-l$(FFMPEG_DIR)/lib/swscale",
"-l$(FFMPEG_DIR)/lib/swresample"
]
}]
]
}
]
}