summaryrefslogtreecommitdiff
path: root/binding.gyp
blob: 1f0f81c1fe2c73759f5edb5d30f923aecc0c286e (plain)
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': '<(module_name)',
      'dependencies': [
        './<(mbgl)/mbgl.gyp:core',
        './<(mbgl)/mbgl.gyp:platform-<(platform_lib)',
        './<(mbgl)/mbgl.gyp:headless-<(headless_lib)',
      ],

      'include_dirs': [ "<!(node -e \"require('nan')\")" ],

      'sources': [
        'src/node_mapbox_gl_native.cpp',
        'src/compress_png.hpp',
        'src/compress_png.cpp',
        'src/node_log.hpp',
        'src/node_log.cpp',
        'src/node_file_source.hpp',
        'src/node_file_source.cpp',
        'src/node_map.hpp',
        'src/node_map.cpp',
        'src/node_request.hpp',
        'src/node_request.cpp',
        'src/util/async_queue.hpp',
      ],

      'conditions': [
        ['OS=="mac"', {
          'xcode_settings': {
            'CLANG_CXX_LIBRARY': 'libc++',
            'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
            'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
            'GCC_ENABLE_CPP_RTTI': 'YES',
            'OTHER_CPLUSPLUSFLAGS': [
              '-std=c++1y',
              '-Werror',
              '-Wall',
              '-Wextra',
              '-Wshadow',
              '-Wno-variadic-macros',
              '-Wno-error=unused-parameter',
              '-frtti',
              '-fexceptions',
            ],
            'GCC_WARN_PEDANTIC': 'YES',
            'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE',
            'MACOSX_DEPLOYMENT_TARGET': '10.9',
          },
        }, {
          'cflags_cc': [
            '-std=c++14',
            '-Werror',
            '-Wall',
            '-Wextra',
            '-Wshadow',
            '-Wno-variadic-macros',
            '-Wno-error=unused-parameter',
            '-frtti',
            '-fexceptions',
          ],
          'libraries': [ '<@(glfw3_ldflags)' ],
        }],
        ['OS=="linux"', {
          'cflags_cc': [
            '-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin.
          ],
        }],
      ],
    },

    { 'target_name': 'action_after_build',
      'type': 'none',
      'dependencies': [ '<(module_name)' ],
      'copies': [
        {
          'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
          'destination': '<(module_path)'
        }
      ]
    }
  ]
}