Skip to content

Commit cee014b

Browse files
committed
add node.lib directive
1 parent c32ae57 commit cee014b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,8 @@ if(WIN32)
8787
endif()
8888

8989
target_link_libraries(${PROJECT_NAME} PRIVATE ${LINK_LIBRARIES})
90+
91+
if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)
92+
# Generate node.lib
93+
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
94+
endif()

0 commit comments

Comments
 (0)