From 771746bd7e07bb508ca5960bac91b28674924226 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 12 Dec 2012 10:37:27 -0800 Subject: [PATCH] Set gtest_force_shared_crt, take 2. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 675fd226..e5abb333 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,10 @@ endif () # pre-compiled copy of Google Test (for example, into /usr/local)?" # at http://code.google.com/p/googletest/wiki/FAQ for more details. if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt) - set(gtest_force_shared_crt ON) + option( + gtest_force_shared_crt + "Use shared (DLL) run-time lib even when Google Test is built as static lib." + ON) add_subdirectory(gtest) include_directories(gtest/include) link_directories(${CMAKE_CURRENT_BINARY_DIR}/gtest)