aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/grpc/00002-static-linking-in-linux.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/grpc/00002-static-linking-in-linux.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/grpc/00002-static-linking-in-linux.patch')
-rw-r--r--vcpkg/ports/grpc/00002-static-linking-in-linux.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/vcpkg/ports/grpc/00002-static-linking-in-linux.patch b/vcpkg/ports/grpc/00002-static-linking-in-linux.patch
new file mode 100644
index 0000000..8999a24
--- /dev/null
+++ b/vcpkg/ports/grpc/00002-static-linking-in-linux.patch
@@ -0,0 +1,16 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8f78306f77..e09f8fcc1e 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)