cmake: normalize uppercase hex winver (for display)

For display and consistency with other regexp. It did not cause harm.

Follow-up to 2100d9fde2 #12044

Closes #20586
This commit is contained in:
Viktor Szakats 2026-02-13 10:39:28 +01:00
parent 20ae14a322
commit cf9e445e03
No known key found for this signature in database

View file

@ -214,7 +214,7 @@ if(WIN32)
if(HAVE_WIN32_WINNT)
string(REGEX MATCH "_WIN32_WINNT=0x[0-9a-fA-F]+" CURL_TEST_OUTPUT "${CURL_TEST_OUTPUT}")
string(REGEX REPLACE "_WIN32_WINNT=" "" CURL_TEST_OUTPUT "${CURL_TEST_OUTPUT}")
string(REGEX REPLACE "0x([0-9a-f][0-9a-f][0-9a-f])$" "0x0\\1" CURL_TEST_OUTPUT "${CURL_TEST_OUTPUT}") # pad to 4 digits
string(REGEX REPLACE "0x([0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])$" "0x0\\1" CURL_TEST_OUTPUT "${CURL_TEST_OUTPUT}") # pad to 4 digits
string(TOLOWER "${CURL_TEST_OUTPUT}" HAVE_WIN32_WINNT)
message(STATUS "Found _WIN32_WINNT=${HAVE_WIN32_WINNT}")
endif()