vcpkg/ports/grpc/00002-static-linking-in-linux.patch
Jozef Izso e510f8708e [grpc] Update grpc to 1.24.3 (#9135)
* [grpc] Update grpc to 1.24.0

* [grpc] Update grpc to 1.24.3

* Disable error C4146 on uwp

C4146: unary minus operator applied to unsigned type, result still unsigned
2020-01-02 14:10:18 -08:00

17 lines
531 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74bbd3294f..f6c4a340fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -99,6 +99,11 @@ endif()
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+if (gRPC_STATIC_LINKING AND NOT _gRPC_PLATFORM_WINDOWS)
+ # Force to static link
+ set(CMAKE_EXE_LINKER_FLAGS "-Bstatic")
+endif()
+
if (MSVC)
include(cmake/msvc_static_runtime.cmake)
add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)