Skip to content

Commit

Permalink
Merge pull request #2253 from natiz/master
Browse files Browse the repository at this point in the history
grpc-tools: Update protoc to v3.19.1
  • Loading branch information
murgatroid99 committed Dec 1, 2022
2 parents a70b271 + df8c719 commit 8d6b590
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
31 changes: 24 additions & 7 deletions packages/grpc-tools/CMakeLists.txt
@@ -1,17 +1,21 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.7)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

# MSVC runtime library flags are selected by an abstraction.
if(COMMAND cmake_policy AND POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/protobuf)
add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake deps/protobuf)

set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib.")
set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/protobuf)
add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake deps/protobuf)

set(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-stack-protector")
Expand All @@ -22,8 +26,21 @@ add_executable(grpc_node_plugin
)

if (MSVC)
add_definitions(/MTd)
endif (MSVC)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>)
else ()
foreach (flag_var
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if (${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif (${flag_var} MATCHES "/MD")
endforeach (flag_var)
endif ()
endif (MVC)

target_include_directories(grpc_node_plugin
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
Expand All @@ -34,4 +51,4 @@ target_include_directories(grpc_node_plugin
target_link_libraries(grpc_node_plugin
libprotoc
libprotobuf
)
)
2 changes: 1 addition & 1 deletion packages/grpc-tools/deps/protobuf
Submodule protobuf updated 1018 files
2 changes: 1 addition & 1 deletion packages/grpc-tools/package.json
@@ -1,6 +1,6 @@
{
"name": "grpc-tools",
"version": "1.11.3",
"version": "1.12.0",
"author": "Google Inc.",
"description": "Tools for developing with gRPC on Node.js",
"homepage": "https://grpc.io/",
Expand Down

0 comments on commit 8d6b590

Please sign in to comment.