From 8082c46592a3b898e1be2f6f5da0a730af54c265 Mon Sep 17 00:00:00 2001 From: Amit Date: Sat, 6 Feb 2021 21:00:02 -0500 Subject: [PATCH] add support for Windows OS --- binding.gyp | 1 + package.json | 4 ---- vendor/libraw.gyp | 7 +++++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/binding.gyp b/binding.gyp index faf3f71..997ba3a 100644 --- a/binding.gyp +++ b/binding.gyp @@ -2,6 +2,7 @@ "targets": [ { "target_name": "node_libraw", + "type": "static_library", "sources": [ "node_libraw.cc" ], 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], diff --git a/package.json b/package.json index 23860ef..31f031a 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,6 @@ "name": "libraw", "version": "0.1.4", "description": "Asynchronous bindings for LibRaw", - "os": [ - "darwin", - "linux" - ], "repository": { "type": "git", "url": "git://github.com/m0g/node-libraw.git" diff --git a/vendor/libraw.gyp b/vendor/libraw.gyp index c681ee4..1b8a364 100644 --- a/vendor/libraw.gyp +++ b/vendor/libraw.gyp @@ -11,6 +11,13 @@ "LibRaw/src/libraw_datastream.cpp", "LibRaw/src/libraw_c_api.cpp" ], + 'conditions': [ + ['OS=="win"', + { + 'defines': ["_UNICODE", "UNICODE","_WINDOWS","WIN32","_ENABLE_EXTENDED_ALIGNED_STORAGE","WIN64","LIBRAW_BUILDLIB"], + } + ] + ], "include_dirs": [ "./LibRaw" ],