Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 70 lines (69 sloc) 1.632 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
{
  'targets': [
    {
      'target_name': 'ffi_bindings',
      'sources': [
          'src/ffi.cc'
        , 'src/callback_info.cc'
        , 'src/threaded_callback_invokation.cc'
      ],
      'include_dirs': [
          'deps/libffi/include'
      ],
      'dependencies': [
        'libffi'
      ],
      'conditions': [
        ['OS=="win"', {
          'libraries': [
              '<(module_root_dir)/deps/libffi/.libs/libffi.lib'
          ],
          'dependencies': [
              'deps/dlfcn-win32/dlfcn.gyp:dlfcn'
            , 'deps/pthreads-win32/pthread.gyp:pthread'
          ]
        }, {
          'libraries': [
              '<(module_root_dir)/deps/libffi/.libs/libffi.a'
          ],
        }],
        ['OS=="mac"', {
          'xcode_settings': {
            'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
            'MACOSX_DEPLOYMENT_TARGET': '10.5',
            'OTHER_CFLAGS': [
                '-ObjC++'
            ]
          },
          'libraries': [
              '-lobjc'
          ],
        }]
      ]
    },
    {
      'target_name': 'libffi',
      'type': 'none',
      'actions': [
        {
          'action_name': 'test',
          # a hack to run libffi ./configure during `node-gyp configure`
          'inputs': ['<!@(sh libffi-config.sh)'],
          'outputs': [''],
          'conditions': [
            ['OS=="win"', {
             'action': [
                'echo', 'test'
              ]
            }, {
              'action': [
                # run libffi `make`
                'sh', 'libffi-build.sh'
             ]
           }]
          ]
        }
      ]
    }
  ]
}
Something went wrong with that request. Please try again.