Fix CMake Policy 0091
@@ -10,9 +10,12 @@ if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
set(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION 10.0.18362.0 CACHE STRING INTERNAL FORCE)
endif()
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" AND NOT QUIC_TLS STREQUAL "mitls")
+if (QUIC_TLS STREQUAL "mitls")
+ message(WARNING "Policy 0091 unsupported for miTLS.")
+else()
if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
+ message(STATUS "Setting policy 0091")
else()
message(WARNING "CMake version too old to support Policy 0091; CRT static linking won't work")
endif()
