2017-02-28 23:51:22 +00:00
|
|
|
find_package(PkgConfig QUIET)
|
|
|
|
pkg_check_modules(PC_CURL libcurl)
|
|
|
|
set_extra_dirs(CURL curl)
|
|
|
|
|
|
|
|
find_path(CURL_INCLUDEDIR curl/curl.h
|
|
|
|
HINTS ${PC_CURL_INCLUDEDIR} ${PC_CURL_INCLUDE_DIRS}
|
|
|
|
PATHS ${EXTRA_CURL_INCLUDEDIR}
|
|
|
|
)
|
|
|
|
find_library(CURL_LIBRARY
|
|
|
|
NAMES curl
|
|
|
|
HINTS ${PC_CURL_LIBDIR} ${PC_CURL_LIBRARY_DIRS}
|
|
|
|
PATHS ${EXTRA_CURL_LIBDIR}
|
|
|
|
)
|
2017-02-23 13:16:32 +00:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2017-02-28 23:51:22 +00:00
|
|
|
find_package_handle_standard_args(Curl DEFAULT_MSG CURL_LIBRARY CURL_INCLUDEDIR)
|
|
|
|
|
|
|
|
mark_as_advanced(CURL_LIBRARY CURL_INCLUDEDIR)
|
|
|
|
|
|
|
|
set(CURL_LIBRARIES ${CURL_LIBRARY})
|
|
|
|
set(CURL_INCLUDE_DIRS ${CURL_INCLUDEDIR})
|