Skip to content

Commit

Permalink
[node-api] Fix MacOS linking errors (microsoft#29013)
Browse files Browse the repository at this point in the history
* fix

* add version
  • Loading branch information
Pospelove authored Jan 18, 2023
1 parent b23dcc7 commit 3f18689
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ports/node-api/unofficial-node-api-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ set_target_properties(unofficial::node-api::node-api PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${node-api_INCLUDE_DIR}"
)

if(APPLE)
set_target_properties(unofficial::node-api::node-api PROPERTIES
INTERFACE_LINK_OPTIONS "LINKER:SHELL:-undefined dynamic_lookup"
)
endif()

if(WIN32)
find_library(node-api_LIBRARY_RELEASE NAMES node PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib" NO_DEFAULT_PATH REQUIRED)
find_library(node-api_LIBRARY_DEBUG NAMES node PATHS "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib" NO_DEFAULT_PATH REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions ports/node-api/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "node-api",
"version-semver": "18.12.1",
"port-version": 1,
"description": "NodeJS API for writing modules in C++",
"homepage": "https://nodejs.org/api/addons.html",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5346,7 +5346,7 @@
},
"node-api": {
"baseline": "18.12.1",
"port-version": 0
"port-version": 1
},
"nonius": {
"baseline": "2019-04-20",
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/node-api.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1b12126f91686d77b2ea46cd9c7e311f000f7bb9",
"version-semver": "18.12.1",
"port-version": 1
},
{
"git-tree": "174e2ac98335fd5510219bd9e0b550b51ce14ee3",
"version-semver": "18.12.1",
Expand Down

0 comments on commit 3f18689

Please sign in to comment.