binding.gyp 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {
  2. "targets": [
  3. {
  4. "target_name": "watcher",
  5. "defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
  6. "sources": [ "src/binding.cc", "src/Watcher.cc", "src/Backend.cc", "src/DirTree.cc", "src/Glob.cc", "src/Debounce.cc" ],
  7. "include_dirs" : ["<!(node -p \"require('node-addon-api').include_dir\")"],
  8. 'cflags!': [ '-fno-exceptions' ],
  9. 'cflags_cc!': [ '-fno-exceptions' ],
  10. "conditions": [
  11. ['OS=="mac"', {
  12. "sources": [
  13. "src/watchman/BSER.cc",
  14. "src/watchman/WatchmanBackend.cc",
  15. "src/shared/BruteForceBackend.cc",
  16. "src/unix/fts.cc",
  17. "src/macos/FSEventsBackend.cc",
  18. "src/kqueue/KqueueBackend.cc"
  19. ],
  20. "link_settings": {
  21. "libraries": ["CoreServices.framework"]
  22. },
  23. "defines": [
  24. "WATCHMAN",
  25. "BRUTE_FORCE",
  26. "FS_EVENTS",
  27. "KQUEUE"
  28. ],
  29. "xcode_settings": {
  30. "GCC_ENABLE_CPP_EXCEPTIONS": "YES"
  31. }
  32. }],
  33. ['OS=="mac" and target_arch=="arm64"', {
  34. "xcode_settings": {
  35. "ARCHS": ["arm64"]
  36. }
  37. }],
  38. ['OS=="linux" or OS=="android"', {
  39. "sources": [
  40. "src/watchman/BSER.cc",
  41. "src/watchman/WatchmanBackend.cc",
  42. "src/shared/BruteForceBackend.cc",
  43. "src/linux/InotifyBackend.cc",
  44. "src/unix/legacy.cc"
  45. ],
  46. "defines": [
  47. "WATCHMAN",
  48. "INOTIFY",
  49. "BRUTE_FORCE"
  50. ]
  51. }],
  52. ['OS=="win"', {
  53. "sources": [
  54. "src/watchman/BSER.cc",
  55. "src/watchman/WatchmanBackend.cc",
  56. "src/shared/BruteForceBackend.cc",
  57. "src/windows/WindowsBackend.cc",
  58. "src/windows/win_utils.cc"
  59. ],
  60. "defines": [
  61. "WATCHMAN",
  62. "WINDOWS",
  63. "BRUTE_FORCE"
  64. ],
  65. "msvs_settings": {
  66. "VCCLCompilerTool": {
  67. "ExceptionHandling": 1, # /EHsc
  68. }
  69. }
  70. }],
  71. ['OS=="freebsd"', {
  72. "sources": [
  73. "src/watchman/BSER.cc",
  74. "src/watchman/WatchmanBackend.cc",
  75. "src/shared/BruteForceBackend.cc",
  76. "src/unix/fts.cc",
  77. "src/kqueue/KqueueBackend.cc"
  78. ],
  79. "defines": [
  80. "WATCHMAN",
  81. "BRUTE_FORCE",
  82. "KQUEUE"
  83. ]
  84. }]
  85. ]
  86. }
  87. ],
  88. "variables": {
  89. "openssl_fips": "",
  90. "node_use_dtrace": "false"
  91. }
  92. }