mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
cmake: limit CURL_STATIC_CRT
to MSVC
`CURL_STATIC_CRT` supports MSVC only. Limit its effect to this compiler. Closes #15403
This commit is contained in:
parent
c9b54fadd7
commit
f48609d4c1
@ -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$<$<CONFIG:Debug>:Debug>")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
|
||||
|
Loading…
Reference in New Issue
Block a user