]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: support adding a suffix to the OS value
authorViktor Szakats <commit@vsz.me>
Thu, 26 May 2022 15:54:20 +0000 (15:54 +0000)
committerViktor Szakats <commit@vsz.me>
Thu, 26 May 2022 15:54:20 +0000 (15:54 +0000)
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

CMakeLists.txt

index ee0cce08ab881681ba17cee041af26a200b9afee..fb1b2210d64350f8b591c67c99a0ab67f1dae5e4 100644 (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)