]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: use `list(APPEND)` on `CURL_INCLUDES`
authorViktor Szakats <commit@vsz.me>
Wed, 23 Oct 2024 22:48:34 +0000 (00:48 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 24 Oct 2024 17:16:10 +0000 (19:16 +0200)
It does the same as the `set()` used before this patch.
Makes the code easier to read.

Closes #15399

CMake/Macros.cmake
CMakeLists.txt

index f1840943a3e160e9f12b27e4a26e2a8cc42fa8bf..7877f4c9037053658bdb9a682a6cc210f1f4121c 100644 (file)
@@ -30,7 +30,7 @@
 macro(check_include_file_concat _file _variable)
   check_include_files("${CURL_INCLUDES};${_file}" ${_variable})
   if(${_variable})
-    set(CURL_INCLUDES ${CURL_INCLUDES} ${_file})
+    list(APPEND CURL_INCLUDES ${_file})
   endif()
 endmacro()
 
index 12a2907de69aef46e41999acac7a21231e9041f9..58bd67b08ccd49d1d646d0f2aa0657affb74ca3b 100644 (file)
@@ -1414,8 +1414,8 @@ endif()
 
 # Check for header files
 if(WIN32)
-  set(CURL_INCLUDES ${CURL_INCLUDES} "winsock2.h")
-  set(CURL_INCLUDES ${CURL_INCLUDES} "ws2tcpip.h")
+  list(APPEND CURL_INCLUDES "winsock2.h")
+  list(APPEND CURL_INCLUDES "ws2tcpip.h")
 
   if(HAVE_WIN32_WINNT)
     if(HAVE_WIN32_WINNT LESS 0x0501)