mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
cmake: respect cflags/libdirs of native pkg-config detections
In Find modules with native pkg-config detection (libgsasl, libidn2, libssh, libuv, nettle) use the C compiler flags returned by pkg-config. Also use the library paths, and return the pathless library names. Also: - add these library paths to `libcurl.pc`/`curl-config`. - fix libgsasl detection to use the detected header directory. FindGSS already did this before this patch. Fixes #14641 Closes #14652
This commit is contained in:
parent
4f09967a3c
commit
7c0b6eb3bd
6 changed files with 46 additions and 8 deletions
|
|
@ -33,6 +33,8 @@
|
|||
# LIBIDN2_FOUND System has libidn2
|
||||
# LIBIDN2_INCLUDE_DIRS The libidn2 include directories
|
||||
# LIBIDN2_LIBRARIES The libidn2 library names
|
||||
# LIBIDN2_LIBRARY_DIRS The libidn2 library directories
|
||||
# LIBIDN2_CFLAGS Required compiler flags
|
||||
# LIBIDN2_VERSION Version of libidn2
|
||||
|
||||
if(CURL_USE_PKGCONFIG AND
|
||||
|
|
@ -43,7 +45,7 @@ if(CURL_USE_PKGCONFIG AND
|
|||
endif()
|
||||
|
||||
if(LIBIDN2_FOUND)
|
||||
set(LIBIDN2_LIBRARIES ${LIBIDN2_LINK_LIBRARIES})
|
||||
string(REPLACE ";" " " LIBIDN2_CFLAGS "${LIBIDN2_CFLAGS}")
|
||||
message(STATUS "Found Libidn2 (via pkg-config): ${LIBIDN2_INCLUDE_DIRS} (found version \"${LIBIDN2_VERSION}\")")
|
||||
else()
|
||||
find_path(LIBIDN2_INCLUDE_DIR NAMES "idn2.h")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue