forked from fluxio/node-cgal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
72 lines (62 loc) · 2.22 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
{
'targets': [{
'target_name': 'cgal',
'sources': [
'src/cgal.cc',
'src/AffTransformation2.cc',
'src/Arrangement2.cc',
'src/Arrangement2Face.cc',
'src/Arrangement2Halfedge.cc',
'src/Arrangement2Vertex.cc',
'src/BBox2.cc',
'src/Curve2.cc',
'src/D2.cc',
'src/Direction2.cc',
'src/Line2.cc',
'src/Point2.cc',
'src/Polygon2.cc',
'src/PolygonSet2.cc',
'src/PolygonWithHoles2.cc',
'src/Ray2.cc',
'src/Segment2.cc',
'src/Vector2.cc'
],
'include_dirs': [
'<!@(node -p "require(\'node-addon-api\').include")',
'<!@(echo $CGAL_GYP_INCLUDES)'
],
'dependencies': [
'<!(node -p "require(\'node-addon-api\').gyp")'
],
'defines': [
'<!@(echo ${CGAL_USE_EPECK:+CGAL_USE_EPECK=$CGAL_USE_EPECK})'
],
'conditions': [
['OS=="mac"', {
'libraries': [ 'libCGAL.a', 'libgmp.a', 'libmpfr.a', 'libboost_thread-mt.a' ],
'cflags+': ['-fvisibility=hidden'],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'OTHER_CPLUSPLUSFLAGS': [
'-Wno-null-pointer-arithmetic',
'<!@(echo $CGAL_GYP_CXXFLAGS)'
],
'OTHER_LDFLAGS': [ '<!@(echo $CGAL_GYP_LDFLAGS)' ]
}
}],
['OS=="linux"', {
'cflags_cc!': [ '-fno-exceptions', '-fno-rtti' ],
'cflags_cc': [
'-frounding-math',
'<!@(echo $CGAL_GYP_CXXFLAGS)'
],
'libraries': [ '-lCGAL', '-lgmp', '-lmpfr', '-lboost_thread' ],
'ldflags': [ '<!@(echo $CGAL_GYP_LDFLAGS)', '-Bstatic ' ]
}]
]
}]
}