2019-04-19 17:27:19 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2020-01-07 04:24:51 +08:00
|
|
|
index a2f23d5..e433e8d 100644
|
2019-04-19 17:27:19 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2020-01-07 04:24:51 +08:00
|
|
|
@@ -111,6 +111,11 @@ endif()
|
2019-04-19 17:27:19 +08:00
|
|
|
|
2020-01-03 06:10:19 +08:00
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
2019-04-19 17:27:19 +08:00
|
|
|
|
2019-05-18 02:18:26 +08:00
|
|
|
+if (gRPC_STATIC_LINKING AND NOT _gRPC_PLATFORM_WINDOWS)
|
2019-04-21 17:01:16 +08:00
|
|
|
+ # Force to static link
|
2019-04-19 17:27:19 +08:00
|
|
|
+ set(CMAKE_EXE_LINKER_FLAGS "-Bstatic")
|
|
|
|
+endif()
|
|
|
|
+
|
2020-01-07 04:24:51 +08:00
|
|
|
if(MSVC)
|
2019-04-19 17:27:19 +08:00
|
|
|
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)
|