From: Viktor Szakats Date: Thu, 24 Oct 2024 14:50:33 +0000 (+0200) Subject: cmake: limit `CURL_STATIC_CRT` to MSVC X-Git-Tag: curl-8_11_0~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f48609d4c1ad7e0a6a285ec6bb9dd5c80d53b72b;p=thirdparty%2Fcurl.git cmake: limit `CURL_STATIC_CRT` to MSVC `CURL_STATIC_CRT` supports MSVC only. Limit its effect to this compiler. Closes #15403 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 58bd67b08c..f40801eeda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,8 +156,8 @@ option(ENABLE_ARES "Enable c-ares support" OFF) option(CURL_DISABLE_INSTALL "Disable installation targets" OFF) if(WIN32) - option(CURL_STATIC_CRT "Build libcurl with static CRT on Windows (/MT)" OFF) - if(CURL_STATIC_CRT) + option(CURL_STATIC_CRT "Build libcurl with static CRT with MSVC (/MT)" OFF) + if(CURL_STATIC_CRT AND MSVC) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")