From 13159a59e1d1715046e5b912d307c6e35d3b4631 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Fri, 1 May 2020 04:34:48 -0500 Subject: [PATCH] make cmake version bump conditional on MSVC --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb36210..31d2fba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,8 @@ +if(MSVC) cmake_minimum_required (VERSION 3.16.4) +else() +cmake_minimum_required (VERSION 3.0) +endif() include(CheckFunctionExists) include(CheckSymbolExists) include(CheckLibraryExists) @@ -38,7 +42,7 @@ option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) option(USE_STATIC_MSVC_RUNTIMES "Use /MT instead of /MD in MSVC" OFF) -if( USE_STATIC_MSVC_RUNTIMES ) +if(USE_STATIC_MSVC_RUNTIMES) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") endif()