diff options
| author | Brent Cook <busterb@gmail.com> | 2020-05-01 04:34:48 -0500 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2020-05-01 04:34:48 -0500 |
| commit | 13159a59e1d1715046e5b912d307c6e35d3b4631 (patch) | |
| tree | 7492ebc36864cd6b06f6d102ee74c4b240aa654e | |
| parent | 1c3377bac0a55e6a5e86e25556bf1635bb1c7bdb (diff) | |
| download | portable-13159a59e1d1715046e5b912d307c6e35d3b4631.tar.gz portable-13159a59e1d1715046e5b912d307c6e35d3b4631.tar.bz2 portable-13159a59e1d1715046e5b912d307c6e35d3b4631.zip | |
make cmake version bump conditional on MSVC
| -rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fb36210..31d2fba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -1,4 +1,8 @@ | |||
| 1 | if(MSVC) | ||
| 1 | cmake_minimum_required (VERSION 3.16.4) | 2 | cmake_minimum_required (VERSION 3.16.4) |
| 3 | else() | ||
| 4 | cmake_minimum_required (VERSION 3.0) | ||
| 5 | endif() | ||
| 2 | include(CheckFunctionExists) | 6 | include(CheckFunctionExists) |
| 3 | include(CheckSymbolExists) | 7 | include(CheckSymbolExists) |
| 4 | include(CheckLibraryExists) | 8 | include(CheckLibraryExists) |
| @@ -38,7 +42,7 @@ option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) | |||
| 38 | set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) | 42 | set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) |
| 39 | 43 | ||
| 40 | option(USE_STATIC_MSVC_RUNTIMES "Use /MT instead of /MD in MSVC" OFF) | 44 | option(USE_STATIC_MSVC_RUNTIMES "Use /MT instead of /MD in MSVC" OFF) |
| 41 | if( USE_STATIC_MSVC_RUNTIMES ) | 45 | if(USE_STATIC_MSVC_RUNTIMES) |
| 42 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | 46 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") |
| 43 | endif() | 47 | endif() |
| 44 | 48 | ||
