Skip to content

Commit fa9c432

Browse files
authored
Fix V8 build on VS2022 (#1219)
1 parent e624603 commit fa9c432

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dependencies/napi/napi-direct/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ endif()
2727
target_include_directories(napi PUBLIC "include")
2828

2929
# Install v8 SDK from NuGet
30-
function (install_v8_nuget V8_VERSION ARCH VS_PLAT_TOOLSET)
30+
function (install_v8_nuget V8_VERSION ARCH)
3131
download_nuget()
32-
set(V8_PACKAGE_PATH "${NUGET_PATH}/packages/v8-${VS_PLAT_TOOLSET}-${ARCH}.${V8_VERSION}")
33-
set(V8_REDIST_PACKAGE_PATH "${NUGET_PATH}/packages/v8.redist-${VS_PLAT_TOOLSET}-${ARCH}.${V8_VERSION}")
32+
set(V8_PACKAGE_PATH "${NUGET_PATH}/packages/v8-v142-${ARCH}.${V8_VERSION}")
33+
set(V8_REDIST_PACKAGE_PATH "${NUGET_PATH}/packages/v8.redist-v142-${ARCH}.${V8_VERSION}")
3434

3535
add_library(v8_libbase SHARED IMPORTED)
3636
set_target_properties(v8_libbase PROPERTIES IMPORTED_IMPLIB "${V8_PACKAGE_PATH}/lib/Release/v8_libbase.dll.lib")
@@ -58,7 +58,7 @@ if(NOT TARGET javascript_engine)
5858
if(WIN32)
5959
set_cpu_platform_arch()
6060
set(V8_VERSION "8.4.371.15")
61-
install_v8_nuget(${V8_VERSION} ${CPU_ARCH} ${CMAKE_VS_PLATFORM_TOOLSET})
61+
install_v8_nuget(${V8_VERSION} ${CPU_ARCH})
6262
target_link_to_dependencies(javascript_engine INTERFACE v8)
6363

6464
if (CPU_ARCH STREQUAL "x64")

0 commit comments

Comments
 (0)