aboutsummaryrefslogtreecommitdiff
path: root/cmake/CMakeLists.txt
diff options
context:
space:
mode:
authorWalter Gray <wgray@leapmotion.com>2016-06-09 13:25:27 -0700
committerWalter Gray <wgray@leapmotion.com>2016-06-09 17:27:46 -0700
commit4150a91c1465472a6b1f37632b328b1c96a5a5de (patch)
treec7b98c0b0616313768e1cca7c99129cd1a95b8b7 /cmake/CMakeLists.txt
parent78b3498bf4751a04e9dee5eb443cb40674e36d64 (diff)
downloadprotobuf-4150a91c1465472a6b1f37632b328b1c96a5a5de.tar.gz
protobuf-4150a91c1465472a6b1f37632b328b1c96a5a5de.tar.bz2
protobuf-4150a91c1465472a6b1f37632b328b1c96a5a5de.zip
make protobuf_MSVC_STATIC_RUNTIME a dependent option to reflect it's use.
Diffstat (limited to 'cmake/CMakeLists.txt')
-rw-r--r--cmake/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 7e1b385e..07b176d9 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)