From ddea42efaab3889258ac0987abbac6132142b986 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 9 Jan 2020 02:22:32 +0300 Subject: common.cmake: more precise platform detection --- cmake/common.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/common.cmake b/cmake/common.cmake index 1e23121..2179a32 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -63,9 +63,9 @@ if(NOT DEFINED CC_STATIC_RUNTIME) if(DEFINED Boost_USE_STATIC_LIBS AND NOT Boost_USE_STATIC_LIBS) # Linking to dynamic Boost libs and the static runtime is a no-no: set(static_runtime_default_value OFF) - endif() - if(UNIX) - # Linking to the GNU C library statically is dangerous: + elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR MINGW) + else() + # At this point, Linux-like environment & the GNU C Library are assumed. set(static_runtime_default_value OFF) endif() option(CC_STATIC_RUNTIME "Link the runtime statically" "${static_runtime_default_value}") -- cgit v1.2.3