Skip to content

Set CMAKE_JS_NODELIB_DEF and CMAKE_JS_NODELIB_TARGET #248

@kraenhansen

Description

@kraenhansen

Users of cmake-js are instructed to add the following to their CMakeLists.txt

if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)
  # Generate node.lib
  execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
endif()

Which will generate a node.lib file exposed to the CMake project via CMAKE_JS_LIB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CMake RNOur `cmake` wrapping CLIenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions