File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.6 )
1+ cmake_minimum_required (VERSION 3.15 )
22if (COMMAND cmake_policy)
33 cmake_policy (SET CMP0003 NEW)
44endif (COMMAND cmake_policy)
55
6+ # MSVC runtime library flags are selected by an abstraction.
7+ if (COMMAND cmake_policy AND POLICY CMP0091)
8+ cmake_policy (SET CMP0091 NEW)
9+ endif ()
10+
611set (CMAKE_CXX_STANDARD 11)
712set (CMAKE_CXX_STANDARD_REQUIRED ON )
813set (CMAKE_CXX_EXTENSIONS OFF )
914
10- set (PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} /deps/protobuf)
11- add_subdirectory (${PROTOBUF_ROOT_DIR} /cmake deps/protobuf)
12-
1315set (protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests" )
1416set (protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib." )
17+ set (PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} /deps/protobuf)
18+ add_subdirectory (${PROTOBUF_ROOT_DIR} /cmake deps/protobuf)
1519
1620set (CMAKE_EXE_LINKER_FLAGS "-static-libstdc++" )
1721set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-stack-protector" )
@@ -22,7 +26,7 @@ add_executable(grpc_node_plugin
2226)
2327
2428if (MSVC )
25- add_definitions (/MTd )
29+ set (CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug> )
2630endif (MSVC )
2731
2832target_include_directories (grpc_node_plugin
@@ -34,4 +38,4 @@ target_include_directories(grpc_node_plugin
3438target_link_libraries (grpc_node_plugin
3539 libprotoc
3640 libprotobuf
37- )
41+ )
You can’t perform that action at this time.
0 commit comments