# - Try to find the libcurl libraries # Once done this will define # # cURL_FOUND - flag that indicates libcurl is installed # cURL_INCLUDE_DIR - the libcurl include directory # cURL_LIBRARIES - the libcurl library directory FIND_PATH(cURL_INCLUDE_DIR curl.h PATHS ${USERLOCAL_ROOT}/include/curl /usr/include/curl NO_DEFAULT_PATH) FIND_LIBRARY(cURL_LIBRARIES NAMES curl PATHS ${USERLOCAL_ROOT}/lib /usr/lib NO_DEFAULT_PATH) # set FOUND flag IF(cURL_INCLUDE_DIR AND cURL_LIBRARIES) SET(cURL_FOUND 1) #remove last /curl string STRING(REGEX REPLACE "/curl" "" cURL_INCLUDE_DIR_SUP_LEVEL ${cURL_INCLUDE_DIR}) SET (cURL_INCLUDE_DIR ${cURL_INCLUDE_DIR_SUP_LEVEL} ${cURL_INCLUDE_DIR} ) if(NOT cURL_FIND_QUIETLY) message(STATUS "Found cURL: ${cURL_LIBRARIES}") endif(NOT cURL_FIND_QUIETLY) ELSE(cURL_INCLUDE_DIR AND cURL_LIBRARIES) SET(cURL_FOUND 0 CACHE BOOL "Not found cURL library") message(STATUS "NOT Found cURL, disabling it") ENDIF(cURL_INCLUDE_DIR AND cURL_LIBRARIES) MARK_AS_ADVANCED(cURL_INCLUDE_DIR cURL_LIBRARIES)