1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

cmake: use pkg_check_modules() for cURL

The cURL project has provided a pkg-config file for well over a decade
now. Just use that instead of the cmake one, since the latter also
checks for misc curl components, unusual library names (libcurl_imp)
which is not something we need.

In addition, this will make enforcing minimum version much easier.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Emil Velikov
2024-09-29 14:17:05 +01:00
committed by Sébastien Helleu
parent 99b4f9a98d
commit fec71ae30c
4 changed files with 3 additions and 6 deletions
+3 -1
View File
@@ -239,7 +239,9 @@ if(ICONV_FOUND)
endif()
# Check for CURL
find_package(CURL REQUIRED)
pkg_check_modules(LIBCURL REQUIRED libcurl)
include_directories(${LIBCURL_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${LIBCURL_LDFLAGS})
find_library(DL_LIBRARY
NAMES dl
-2
View File
@@ -89,8 +89,6 @@ endif()
include_directories(${GNUTLS_INCLUDE_PATH})
include_directories(${CURL_INCLUDE_DIRS})
if(ENABLE_ZSTD)
include_directories(${LIBZSTD_INCLUDE_DIRS})
endif()
-2
View File
@@ -45,8 +45,6 @@ endif()
list(APPEND EXTRA_LIBS "m")
list(APPEND EXTRA_LIBS ${CURL_LIBRARIES})
list(APPEND EXTRA_LIBS ${ZLIB_LIBRARY})
if(ENABLE_ZSTD)
-1
View File
@@ -228,7 +228,6 @@ target_link_libraries(tests
weechat_ncurses_fake
weechat_unit_tests_core
${EXTRA_LIBS}
${CURL_LIBRARIES}
${ZLIB_LIBRARY}
${LIBZSTD_LDFLAGS}
${CPPUTEST_LIBRARIES}