1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-30 19:03:04 +00:00

Use CURL::libcurl imported target when available

When built with CMake, CURL installation includes configuration package
that could be used instead of CMake-bundled find module. The former
doesn't define CURL_INCLUDE_DIRS and CURL_LIBRARIES variables, but only
imported targets.
This commit is contained in:
Mike Gelfand 2020-08-18 09:56:50 +03:00
parent b8a02fdfb3
commit 057b8a61d6

View file

@ -135,6 +135,10 @@ find_package(Threads)
find_package(PkgConfig QUIET)
find_package(CURL ${CURL_MINIMUM} REQUIRED)
if(TARGET CURL::libcurl)
set(CURL_LIBRARIES CURL::libcurl)
set(CURL_INCLUDE_DIRS)
endif()
find_package(ICONV)