cmake: avoid list(PREPEND) for compatibility

`list(PREPEND)` requires CMake v3.15, our minimum is v3.7.

Ref: https://cmake.org/cmake/help/latest/command/list.html#prepend

Regression from 1e3319a167

Reported-by: Keitagit-kun on Github
Fixes #11141
Closes #11144
This commit is contained in:
Viktor Szakats 2023-05-18 21:02:17 +00:00
parent a64d7de61a
commit 36e998b18b
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -525,7 +525,7 @@ if(CURL_BROTLI)
find_package(Brotli QUIET)
if(BROTLI_FOUND)
set(HAVE_BROTLI ON)
list(PREPEND CURL_LIBS ${BROTLI_LIBRARIES})
set(CURL_LIBS "${BROTLI_LIBRARIES};${CURL_LIBS}") # For 'ld' linker. Emulate `list(PREPEND ...)` to stay compatible with <v3.15 CMake.
list(APPEND CURL_LIBS ${BROTLI_LIBRARIES})
include_directories(${BROTLI_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_INCLUDES ${BROTLI_INCLUDE_DIRS})