Skip to content

Commit

Permalink
fix: fix windows linker flags + use node 18 for MacOS 14
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 20, 2024
1 parent aa6748d commit 0650fb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ jobs:
run: pnpm run build.js

- name: Install Node 12
if: ${{ !matrix.docker }}
if: ${{ !matrix.docker && matrix.os != 'macos-14' }}
uses: actions/setup-node@v4
with:
node-version: 12
architecture: ${{ env.setup_node_arch }}

- name: Build Native with Node 12
- name: Build Native
if: ${{ !matrix.docker }}
run: npm run build.native

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ target_link_system_libraries(addon PRIVATE libzmq libzmq-static)

# Node specific
target_include_system_directories(addon PRIVATE ${CMAKE_JS_INC})
target_link_system_libraries(addon ${CMAKE_JS_LIB})
target_link_system_libraries(addon PRIVATE ${CMAKE_JS_LIB})

target_compile_definitions(addon PRIVATE V8_COMPRESS_POINTERS)
target_compile_definitions(addon PRIVATE V8_31BIT_SMIS_ON_64BIT_ARCH)
Expand All @@ -73,6 +73,6 @@ set_target_properties(addon PROPERTIES PREFIX "" SUFFIX ".node")

# Windows workaround
if(WIN32)
set_property(TARGET addon PROPERTY LINK_FLAGS "-Xlinker /DELAYLOAD:NODE.EXE")
set_property(TARGET addon PROPERTY DELAY_LOAD_DLLS "NODE.EXE")
target_link_libraries(addon PRIVATE "ShLwApi.lib" "delayimp.lib")
endif()

0 comments on commit 0650fb0

Please sign in to comment.