From 0118e8d6228ef6ed094ecb51e8bd91aa3073eda8 Mon Sep 17 00:00:00 2001 From: nimetu Date: Sun, 6 Mar 2022 14:07:10 +0200 Subject: [PATCH] Fix CURL_LIBRARIES for cURL config-file package --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 580b3e082..45519362c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,6 +329,10 @@ IF(WITH_NEL) ENDIF() FIND_PACKAGE(CURL REQUIRED) + # if cmake finds config-file package, ie FIND_PACKAGE(CURL CONFIG), then CURL_LIBRARIES is not defined + IF(TARGET CURL::libcurl) + SET(CURL_LIBRARIES CURL::libcurl) + ENDIF() IF((WIN32 OR CURL_LIBRARIES MATCHES "\\.a") AND WITH_STATIC_CURL) SET(CURL_STATIC ON)