cmake: support adding a suffix to the OS value

CMake automatically uses the `CMAKE_SYSTEM_NAME` value to fill the OS
string appearing in the --version output after the curl version number,
for example:

  'curl 7.83.1 (Windows)'

This patchs adds the ability to pass a suffix that is appended to this
value. It's useful to add CPU info or other platform details,
for example:

  'curl 7.83.1 (Windows-x64)'

Closes #8919
This commit is contained in:
Viktor Szakats 2022-05-26 15:54:20 +00:00
parent 2e769766ea
commit 435f395f3f
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -65,7 +65,7 @@ message(STATUS "curl version=[${CURL_VERSION}]")
# SET(PACKAGE_STRING "curl-")
# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.se/mail/")
set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
set(OS "\"${CMAKE_SYSTEM_NAME}\"")
set(OS "\"${CMAKE_SYSTEM_NAME}${CURL_OS_SUFFIX}\"")
include_directories(${CURL_SOURCE_DIR}/include)