From 211ed38d0dfa251827531455476ca835593d0c61 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Tue, 18 Sep 2018 17:41:34 -0400 Subject: [PATCH] src: make 'nothing' target a static library This avoids the creation of `nothing.node` files in other projects. These files will otherwise be identified as non-N-API modules, even though they are empty. PR-URL: https://github.com/nodejs/node-addon-api/pull/348 Reviewed-By: Michael Dawson Reviewed-By: Nicola Del Gobbo --- src/node_api.gyp | 4 +++- src/nothing.c | 0 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/nothing.c diff --git a/src/node_api.gyp b/src/node_api.gyp index fa34d8308..3de7da141 100644 --- a/src/node_api.gyp +++ b/src/node_api.gyp @@ -1,7 +1,9 @@ { 'targets': [ { - 'target_name': 'nothing' + 'target_name': 'nothing', + 'type': 'static_library', + 'sources': [ 'nothing.c' ] }, { 'target_name': 'node-api', diff --git a/src/nothing.c b/src/nothing.c new file mode 100644 index 000000000..e69de29bb