From: Viktor Szakats Date: Wed, 23 Oct 2024 22:48:34 +0000 (+0200) Subject: cmake: use `list(APPEND)` on `CURL_INCLUDES` X-Git-Tag: curl-8_11_0~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9b54fadd7ec7c88bc6efc6932a5fad235db8a0a;p=thirdparty%2Fcurl.git cmake: use `list(APPEND)` on `CURL_INCLUDES` It does the same as the `set()` used before this patch. Makes the code easier to read. Closes #15399 --- diff --git a/CMake/Macros.cmake b/CMake/Macros.cmake index f1840943a3..7877f4c903 100644 --- a/CMake/Macros.cmake +++ b/CMake/Macros.cmake @@ -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() diff --git a/CMakeLists.txt b/CMakeLists.txt index 12a2907de6..58bd67b08c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)