cmake: respect GNUTLS_CFLAGS when detected via pkg-config

Closes #16242
This commit is contained in:
Viktor Szakats 2025-02-07 13:15:57 +01:00
parent c2aa504ab9
commit a5f120df06
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -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)