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)