forked from Streampunk/codecadon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
161 lines (161 loc) · 5.52 KB
/
binding.gyp
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
"targets": [
{
"target_name": "codecadon",
"sources": [ "src/codecadon.cc",
"src/Concater.cc",
"src/Flipper.cc",
"src/Packer.cc",
"src/ScaleConverter.cc",
"src/Decoder.cc",
"src/Encoder.cc",
"src/Stamper.cc",
"src/ScaleConverterFF.cc",
"src/DecoderFF.cc",
"src/EncoderFF.cc",
"src/Packers.cc" ],
"include_dirs": [ "<!(node -e \"require('nan')\")", "ffmpeg/include" ],
'conditions': [
['OS=="linux"', {
"conditions": [
['target_arch=="arm"',
{
"cflags_cc!": [
"-fno-rtti",
"-fno-exceptions"
],
"cflags_cc": [
"-std=c++11",
"-fexceptions"
],
"link_settings": {
"libraries": [
"<@(module_root_dir)/build/Release/libavcodec.so.57",
"<@(module_root_dir)/build/Release/libavutil.so.55",
"<@(module_root_dir)/build/Release/libswscale.so.4",
"<@(module_root_dir)/build/Release/libopenh264.so.3",
"<@(module_root_dir)/build/Release/libvpx.so.4"
],
"ldflags": [
"-L<@(module_root_dir)/build/Release",
"-Wl,-rpath,<@(module_root_dir)/build/Release"
]
},
"copies": [
{
"destination": "build/Release/",
"files": [
"<!@(ls -1 ffmpeg/bin_armhf/libavcodec.so*)",
"<!@(ls -1 ffmpeg/bin_armhf/libavutil.so*)",
"<!@(ls -1 ffmpeg/bin_armhf/libswscale.so*)",
"<!@(ls -1 ffmpeg/bin_armhf/libopenh264*.so*)",
"<!@(ls -1 ffmpeg/bin_armhf/libvpx*.so*)"
]
}
]
},
{ # ia32 or x64
"defines": [
"__STDC_CONSTANT_MACROS"
],
"cflags_cc!": [
"-fno-rtti",
"-fno-exceptions"
],
"cflags_cc": [
"-std=c++11",
"-fexceptions"
],
"link_settings": {
"libraries": [
"<@(module_root_dir)/build/Release/libavcodec.so.57",
"<@(module_root_dir)/build/Release/libavutil.so.55",
"<@(module_root_dir)/build/Release/libswscale.so.4",
"<@(module_root_dir)/build/Release/libopenh264.so.1",
"<@(module_root_dir)/build/Release/libvpx.so.3"
],
"ldflags": [
"-L<@(module_root_dir)/build/Release",
"-Wl,-rpath,<@(module_root_dir)/build/Release"
]
},
"copies": [
{
"destination": "build/Release/",
"files": [
"<!@(ls -1 ffmpeg/bin/libavcodec.so*)",
"<!@(ls -1 ffmpeg/bin/libavutil.so*)",
"<!@(ls -1 ffmpeg/bin/libswscale.so*)",
"<!@(ls -1 ffmpeg/bin/libopenh264*.so*)",
"<!@(ls -1 ffmpeg/bin/libvpx*.so*)"
]
}
]
}]
]
}],
['OS=="mac"', {
'xcode_settings': {
'GCC_ENABLE_CPP_RTTI': 'YES',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'OTHER_CPLUSPLUSFLAGS': [
'-std=c++11',
'-stdlib=libc++',
'-fexceptions'
],
'OTHER_LDFLAGS': [
"-Wl,-rpath,<@(module_root_dir)/build/Release"
]
},
"link_settings": {
"libraries": [
"<@(module_root_dir)/build/Release/libavcodec.dylib",
"<@(module_root_dir)/build/Release/libavutil.dylib",
"<@(module_root_dir)/build/Release/libswscale.dylib",
"<@(module_root_dir)/build/Release/libopenh264.dylib"
]
},
"copies": [
{
"destination": "build/Release/",
"files": [
"<!@(ls -1 ffmpeg/bin/libavcodec*.dylib)",
"<!@(ls -1 ffmpeg/bin/libavutil*.dylib)",
"<!@(ls -1 ffmpeg/bin/libswscale*.dylib)",
"<!@(ls -1 ffmpeg/bin/libopenh264*.dylib)"
]
}
]
}],
['OS=="win"', {
"configurations": {
"Release": {
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeTypeInfo": "true",
"ExceptionHandling": 1
}
}
}
},
"libraries": [
"-l../ffmpeg/bin/avcodec.lib",
"-l../ffmpeg/bin/avutil.lib",
"-l../ffmpeg/bin/swscale.lib"
],
"copies": [
{
"destination": "build/Release/",
"files": [
"ffmpeg/bin/avcodec-57.dll",
"ffmpeg/bin/avutil-55.dll",
"ffmpeg/bin/swscale-4.dll",
"ffmpeg/bin/openh264.dll"
]
}
]
}]
],
}
]
}