From: Viktor Szakats Date: Fri, 7 Feb 2025 12:15:57 +0000 (+0100) Subject: cmake: respect `GNUTLS_CFLAGS` when detected via `pkg-config` X-Git-Tag: curl-8_12_1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5f120df06a2a3f0c3a42ccae3ac8d754bc45b09;p=thirdparty%2Fcurl.git cmake: respect `GNUTLS_CFLAGS` when detected via `pkg-config` Closes #16242 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ec0792c31..38d7b67478 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -838,6 +838,10 @@ if(CURL_USE_GNUTLS) pkg_check_modules(GNUTLS "gnutls") if(GNUTLS_FOUND) set(GNUTLS_LIBRARIES ${GNUTLS_LINK_LIBRARIES}) + string(REPLACE ";" " " GNUTLS_CFLAGS "${GNUTLS_CFLAGS}") + if(GNUTLS_CFLAGS) + string(APPEND CMAKE_C_FLAGS " ${GNUTLS_CFLAGS}") + endif() endif() endif() if(NOT GNUTLS_FOUND)