Solve bug in FindNodeJS.cmake.
@@ -568,8 +568,13 @@ if(NodeJS_UV_INCLUDE_DIR)
endif()
if(NOT NodeJS_LIBRARY_NAME)
+ if(WIN32 AND MSVC)
+ get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY}" NAME_WLE)
+ set(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY_NAME}.dll")
+ else()
get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY}" NAME)
endif()
+endif()
find_package_handle_standard_args(NodeJS
REQUIRED_VARS NodeJS_EXECUTABLE NodeJS_INCLUDE_DIRS NodeJS_LIBRARY NodeJS_LIBRARY_NAME
