Skip to content

Commit 6a59edc

Browse files
committed
Use weak-node-api linkage in node-addon-examples
1 parent 9180d70 commit 6a59edc

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/node-addon-examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"scripts": {
1313
"copy-examples": "tsx scripts/copy-examples.mts",
14-
"gyp-to-cmake": "gyp-to-cmake .",
14+
"gyp-to-cmake": "gyp-to-cmake --weak-node-api .",
1515
"build": "tsx scripts/build-examples.mts",
1616
"copy-and-build": "node --run copy-examples && node --run gyp-to-cmake && node --run build",
1717
"verify": "tsx scripts/verify-prebuilds.mts",
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
cmake_minimum_required(VERSION 3.15...3.31)
22
project(tests-async)
33

4+
45
include(${WEAK_NODE_API_CONFIG})
56

67
add_library(addon SHARED addon.c)
78
target_link_libraries(addon PRIVATE weak-node-api)
8-
target_compile_features(addon PRIVATE cxx_std_20)
9+
set_target_properties(addon PROPERTIES PREFIX "" SUFFIX ".node")
10+
target_compile_features(addon PRIVATE cxx_std_17)
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
cmake_minimum_required(VERSION 3.15...3.31)
22
project(tests-buffers)
33

4+
45
include(${WEAK_NODE_API_CONFIG})
56

67
add_library(addon SHARED addon.c)
78
target_link_libraries(addon PRIVATE weak-node-api)
8-
target_compile_features(addon PRIVATE cxx_std_20)
9+
set_target_properties(addon PROPERTIES PREFIX "" SUFFIX ".node")
10+
target_compile_features(addon PRIVATE cxx_std_17)

0 commit comments

Comments
 (0)