forked from joshmarinacci/aminogfx-gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
169 lines (161 loc) · 5.86 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
162
163
164
165
166
167
168
169
{
"targets": [
{
"target_name": "aminonative",
"sources":[
"src/base.cpp",
"src/base_js.cpp",
"src/base_weak.cpp",
"src/fonts/vector.c",
"src/fonts/vertex-buffer.c",
"src/fonts/vertex-attribute.c",
"src/fonts/texture-atlas.c",
"src/fonts/texture-font.c",
"src/fonts/utf8-utils.c",
"src/fonts/distance-field.c",
"src/fonts/edtaa3func.c",
"src/fonts/shader.c",
"src/fonts/mat4.c",
"src/fonts.cpp",
"src/images.cpp",
"src/videos.cpp",
"src/shaders.cpp",
"src/renderer.cpp",
"src/mathutils.cpp"
],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"src/",
"src/fonts/",
"src/images/"
],
"cflags": [
"-Wall",
],
"cxxflags": [
"-std=c++11"
],
'conditions': [
# macOS
['OS=="mac"', {
"include_dirs": [
" <!@(freetype-config --cflags)",
" <!@(pkg-config --cflags glfw3)"
],
"libraries": [
" <!@(pkg-config --libs glfw3)",
'-framework OpenGL',
'-framework OpenCL',
'-framework IOKit',
'<!@(freetype-config --libs)',
'-ljpeg',
'-lpng',
'-lavcodec',
'-lavformat',
'-lswscale'
],
"sources": [
"src/mac.cpp",
],
"defines": [
"MAC",
"GLFW_NO_GLU",
"GLFW_INCLUDE_GL3",
# VAO not working
#"FREETYPE_GL_USE_VAO"
],
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS": [
"-std=c++11",
"-stdlib=libc++"
],
"OTHER_LDFLAGS": [
"-stdlib=libc++"
],
"MACOSX_DEPLOYMENT_TARGET": "10.7"
}
}],
# Raspberry Pi
['OS=="linux"', {
"conditions" : [
["target_arch=='arm'", {
"sources": [
"src/ilclient/ilclient.c",
"src/ilclient/ilcore.c",
"src/rpi.cpp",
"src/rpi_video.cpp"
],
"libraries": [
"-L/opt/vc/lib/",
"-lbcm_host",
"-lGLESv2",
"-lEGL",
"-lopenmaxil",
"-lvcos",
"-lvchiq_arm",
'<!@(freetype-config --libs)',
"-ljpeg",
"-lpng",
'-lavcodec',
'-lavformat',
'-lswscale'
],
"defines": [
"RPI"
],
"include_dirs": [
"/opt/vc/include/",
"/opt/vc/include/IL/",
"/usr/include/freetype2",
"/opt/vc/include/interface/vcos/pthreads",
"/opt/vc/include/interface/vmcs_host/linux",
"/opt/vc/include/interface/vchiq/",
'<!@(freetype-config --cflags)'
],
"cflags": [
"-DHAVE_LIBOPENMAX=2",
"-DOMX",
"-DOMX_SKIP64BIT",
"-DUSE_EXTERNAL_OMX",
"-DHAVE_LIBBCM_HOST",
"-DUSE_EXTERNAL_LIBBCM_HOST",
"-DUSE_VCHIQ_ARM",
# get stack trace on ARM
"-funwind-tables",
"-rdynamic"
]
}],
["target_arch!='arm'", {
"sources": [
"src/mac.cpp"
],
"libraries":[
'<!@(freetype-config --libs)',
"-lglfw",
"-ljpeg",
"-lpng"
],
"defines": [
"GL_GLEXT_PROTOTYPES",
"LINUX"
],
"include_dirs": [
"/usr/include/freetype2",
"<!@(freetype-config --cflags)"
]
}]
]
}]
]
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}]
}
]
}