mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 13:19:23 +08:00
17 lines
520 B
Diff
17 lines
520 B
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 3839e22..91720a9 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -99,6 +99,11 @@ set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
|
|
|
add_definitions(-DPB_FIELD_32BIT)
|
|
|
|
+if (gRPC_STATIC_LINKING)
|
|
+ # 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)
|