diff --git a/packages/grpc-tools/CMakeLists.txt b/packages/grpc-tools/CMakeLists.txt index e3deadde..85c90dee 100644 --- a/packages/grpc-tools/CMakeLists.txt +++ b/packages/grpc-tools/CMakeLists.txt @@ -18,6 +18,9 @@ add_executable(grpc_node_plugin src/node_plugin.cc ) +if (MSVC) + add_definitions(/MT) +endif (MSVC) target_include_directories(grpc_node_plugin PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/packages/grpc-tools/build_binaries.ps1 b/packages/grpc-tools/build_binaries.ps1 index 34a38b95..f96e4b98 100644 --- a/packages/grpc-tools/build_binaries.ps1 +++ b/packages/grpc-tools/build_binaries.ps1 @@ -33,8 +33,14 @@ foreach ($Arch in $ArchList) { $Generator = "Visual Studio 14 2015" } - & cmake.exe . - & cmake.exe --build . + & cmake.exe . --config Release + if ($LASTEXITCODE -ne 0) { + throw "cmake failed" + } + & cmake.exe --build . --config Release + if ($LASTEXITCODE -ne 0) { + throw "cmake build failed" + } Copy-Item ($ProtobufBase + "/protoc.exe") -Destination ($Base + "/build/bin/protoc.exe") Copy-Item ($Base + "/grpc_node_plugin.exe") -Destination ($Base + "/build/bin/grpc_node_plugin.exe")