aboutsummaryrefslogtreecommitdiff
path: root/cmake/Findcurl.cmake
blob: 3ad12eaf0656ac26c208d426e7b6e2b2653d0c6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
include(FindPackageHandleStandardArgs)

find_library(CURL_LIBRARY NAMES curl)

find_package_handle_standard_args(curl REQUIRED_VARS CURL_LIBRARY)

if (CURL_FOUND)
    mark_as_advanced(CURL_LIBRARY)
endif()

if(CURL_FOUND AND NOT TARGET curl::curl)
    add_library(CURL::libcurl IMPORTED UNKNOWN)
    set_property(TARGET CURL::libcurl PROPERTY IMPORTED_LOCATION ${CURL_LIBRARY})
endif()