Skip to content

Commit

Permalink
fix: add some missing platform specific bits
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Feb 6, 2024
1 parent e424cde commit f19413c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions share/cmake/CMakeJS.cmake
Expand Up @@ -650,8 +650,22 @@ set_target_properties (cmake-js PROPERTIES COMPATIBLE_INTERFACE_STRING CMa

if (MSVC)
target_sources (cmake-js INTERFACE "${_CMAKEJS_DIR}/lib/cpp/win_delay_load_hook.cc")

# setup delayload
target_link_options(cmake-js PRIVATE "/DELAYLOAD:NODE.EXE")
target_link_libraries(cmake-js PRIVATE delayimp)

if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)")
target_link_options(cmake-js PUBLIC "/SAFESEH:NO")
endif()
endif()

# TODO: Does macos need the following still?
# this.compilerFlags.push('-D_DARWIN_USE_64_BIT_INODE=1')
# this.compilerFlags.push('-D_LARGEFILE_SOURCE')
# this.compilerFlags.push('-D_FILE_OFFSET_BITS=64')
# this.linkerFlags.push('-undefined dynamic_lookup')

function(_cmakejs_export_target name)
export (
TARGETS ${name}
Expand Down

0 comments on commit f19413c

Please sign in to comment.