cmake: sync protocol/feature list with curl -V output

- sort features case-insensitively.
  Requires CMake v3.13.0.
  Follow-up to 0f26abeef1 #14063

- convert protocol list to lowercase.
  But leave it uppercase in `curl-config`.

Closes #14066
This commit is contained in:
Viktor Szakats 2024-07-01 00:39:03 +02:00
parent a3e613a84f
commit 6b10edb764
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -1698,7 +1698,11 @@ if(NOT CURL_DISABLE_INSTALL)
(WIN32 AND HAVE_WIN32_WINNT GREATER_EQUAL 0x600))
_add_if("PSL" USE_LIBPSL)
if(_items)
list(SORT _items)
if(NOT CMAKE_VERSION VERSION_LESS 3.13)
list(SORT _items CASE INSENSITIVE)
else()
list(SORT _items)
endif()
endif()
string(REPLACE ";" " " SUPPORT_FEATURES "${_items}")
message(STATUS "Enabled features: ${SUPPORT_FEATURES}")
@ -1745,7 +1749,8 @@ if(NOT CURL_DISABLE_INSTALL)
list(SORT _items)
endif()
string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}")
message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}")
string(TOLOWER "${SUPPORT_PROTOCOLS}" SUPPORT_PROTOCOLS_LOWER)
message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS_LOWER}")
# Clear list and collect SSL backends
set(_items)