2020-02-12 08:33:48 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2020-06-24 05:36:26 +08:00
|
|
|
index 84de29f..0c6dc0e 100644
|
2020-02-12 08:33:48 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2020-06-24 05:36:26 +08:00
|
|
|
@@ -165,6 +165,11 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
2020-02-12 08:33:48 +08:00
|
|
|
|
2020-06-24 05:36:26 +08:00
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
|
|
|
|
+
|
2020-02-12 08:33:48 +08:00
|
|
|
+if (gRPC_STATIC_LINKING AND NOT _gRPC_PLATFORM_WINDOWS)
|
|
|
|
+ # Force to static link
|
|
|
|
+ set(CMAKE_EXE_LINKER_FLAGS "-Bstatic")
|
|
|
|
+endif()
|
2020-06-24 05:36:26 +08:00
|
|
|
|
2020-02-12 08:33:48 +08:00
|
|
|
if(MSVC)
|
|
|
|
include(cmake/msvc_static_runtime.cmake)
|