From 5626955bcdde93852481b70713f133a1cd0d1df2 Mon Sep 17 00:00:00 2001 From: Contra Date: Thu, 1 Nov 2012 16:22:52 -0700 Subject: [PATCH] fix binding.gyp --- binding.gyp | 30 ++++++++++++++++++++++++++++-- package.json | 3 --- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/binding.gyp b/binding.gyp index 9da1fc1..972e58f 100755 --- a/binding.gyp +++ b/binding.gyp @@ -11,8 +11,34 @@ "src/module.cpp", "src/buffer_compat.cpp", ], - "include_dirs" : [ "gyp/include" ] + "conditions" : [ + [ + 'OS=="linux"', { + "libraries" : [ + '-lpng', + '-lz' + ], + 'cflags!': [ '-fno-exceptions' ], + 'cflags_cc!': [ '-fno-exceptions' ] + } + ], + [ + 'OS=="mac"', { + 'xcode_settings': { + 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' + } + } + ], + [ + 'OS=="win"', { + "include_dirs" : [ "gyp/include" ], + "libraries" : [ + '<(module_root_dir)/gyp/lib/libpng.lib', + '<(module_root_dir)/gyp/lib/zlib.lib' + ] + } + ] + ] } ] } - diff --git a/package.json b/package.json index 5d46ee5..272b28a 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,6 @@ }, "engines": { "node": ">=0.6.0" - }, - "scripts": { - "install": "node-waf configure build" } }