]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: sync protocol/feature list with `curl -V` output
authorViktor Szakats <commit@vsz.me>
Sun, 30 Jun 2024 22:39:03 +0000 (00:39 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 1 Jul 2024 21:24:46 +0000 (23:24 +0200)
- sort features case-insensitively.
  Requires CMake v3.13.0.
  Follow-up to 0f26abeef1dd1d1a02f8e12dbc3d51e73e9d2e9c #14063

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

Closes #14066

CMakeLists.txt

index 307dbbce0902dc301064555b6a00671abd361539..42b1a3415a90f6e5f59d8eb086333a1f84aa9be4 100644 (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)