Change to node-addon-api
[node_zettair.git] / binding.gyp
index 9dfa2f8..136e15b 100644 (file)
@@ -2,9 +2,18 @@
   "targets": [
     {
       "target_name": "zettair",
+      "cflags!": ["-fno-exceptions"],
+      "cflags_cc!": ["-fno-exceptions"],
       "sources": ["zettair.cpp"],
-      "include_dirs": ["/home/nick/include"],
-      "libraries": ["-L/home/nick/lib -lzet"]
+      "defines": ["NAPI_DISABLE_CPP_EXCEPTIONS"],
+      "include_dirs": [
+        "<!@(node -p \"require('node-addon-api').include\")",
+        "<!@(echo \"$HOME/include\")"
+      ],
+      "libraries": [
+        "<!@(echo \"-L$HOME/lib\")",
+        "-lzet"
+      ]
     }
   ]
 }