vcpkg/ports/grpc/00002-static-linking-in-linux.patch
Jozef Izso ba2e63548f
[grpc] Update to v1.32.0 - use correct port version (#14152)
* [grpc] grpc v1.32.0 - use correct port version

* [grpc] update 00001-fix-uwp.patch

* [grpc] update 00002-static-linking-in-linux.patch

* [grpc] update 00004-link-gdi32-on-windows.patch

* [grpc] update 00011-fix-csharp_plugin.patch
2020-10-22 22:46:48 -07:00

17 lines
597 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8514d91a8..d0e6cbeaf9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -211,6 +211,11 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+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)