File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -373,11 +373,15 @@ if(NOT NodeJS_LIBRARY)
373373 set (NodeJS_COMPILE_ARCH "x64" )
374374 endif ()
375375
376- # Check vs2017 or vs2015 (TODO: Add more versions if they are supported by NodeJS)
377- if (MSVC_VERSION EQUAL 1900 )
378- set (NodeJS_MSVC_VER vs2015 )
376+ # Check for Visual Studio Version and configure the build command
377+ if (MSVC_VERSION GREATER 1916 )
378+ set (NodeJS_MSVC_VER vs2019 )
379379 elseif (MSVC_VERSION GREATER 1900)
380380 set (NodeJS_MSVC_VER vs2017)
381+ elseif (MSVC_VERSION EQUAL 1900)
382+ set (NodeJS_MSVC_VER vs2015)
383+ else ()
384+ message (FATAL_ERROR "Version of Visual Studio too old, add other toolsets in FindNodeJS.cmake in order to support them" )
381385 endif ()
382386
383387 if (CMAKE_BUILD_TYPE STREQUAL "Debug" )
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ if(UNIX)
4242elseif (WIN32 )
4343 set (BACKTRACE_IMPL win32 )
4444else ()
45- message (ERROR "Backtrace library not supported in this platform" )
45+ message (FATAL_ERROR "Backtrace library not supported in this platform" )
4646endif ()
4747
4848set (sources
You can’t perform that action at this time.
0 commit comments