From 4150a91c1465472a6b1f37632b328b1c96a5a5de Mon Sep 17 00:00:00 2001 From: Walter Gray Date: Thu, 9 Jun 2016 13:25:27 -0700 Subject: [PATCH] make protobuf_MSVC_STATIC_RUNTIME a dependent option to reflect it's use. --- cmake/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 7e1b385e5b..07b176d994 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -20,7 +20,9 @@ else (BUILD_SHARED_LIBS) set(protobuf_BUILD_SHARED_LIBS_DEFAULT OFF) endif (BUILD_SHARED_LIBS) option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" ${protobuf_BUILD_SHARED_LIBS_DEFAULT}) -option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON) +include(CMakeDependentOption) +cmake_dependent_option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON + "NOT protobuf_BUILD_SHARED_LIBS" OFF) if (MSVC) set(protobuf_WITH_ZLIB_DEFAULT OFF) else (MSVC)