mirror of https://github.com/grpc/grpc-node.git
Force plugin to link statically on Windows
This commit is contained in:
parent
8bb3f0a130
commit
90233c965f
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue