...
 
......@@ -33,15 +33,19 @@ if(NOT CURLCPP_FOUND)
find_path(CURLCPP_INCLUDE_DIR curlpp/cURLpp.hpp
HINTS ${CURLCPP_ROOT_DIR} PATH_SUFFIXES include)
find_path(CURL_INCLUDE_DIR curl/curl.h
HINTS ${CURL_ROOT_DIR} PATH_SUFFIXES include) # curlpp depends on curl headers
find_library(CURLCPP_LIBRARY curlpp
HINTS ${CURLCPP_ROOT_DIR} PATH_SUFFIXES lib)
mark_as_advanced(CURLCPP_INCLUDE_DIR CURLCPP_LIBRARY)
find_library(CURL_LIBRARY curl) # curlpp depends on libcurl
mark_as_advanced(CURLCPP_INCLUDE_DIR CURLCPP_LIBRARY CURL_LIBRARY)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(curlcpp DEFAULT_MSG
CURLCPP_LIBRARY CURLCPP_INCLUDE_DIR)
set(CURLCPP_INCLUDE_DIRS ${CURLCPP_INCLUDE_DIR})
set(CURLCPP_LIBRARIES ${CURLCPP_LIBRARY})
set(CURLCPP_INCLUDE_DIRS ${CURLCPP_INCLUDE_DIR} ${CURL_INCLUDE_DIR})
set(CURLCPP_LIBRARIES ${CURLCPP_LIBRARY} ${CURL_LIBRARY})
endif(NOT CURLCPP_FOUND)
......@@ -27,7 +27,7 @@
#include <cstdlib>
#include <iostream>
#include <string>
#include <curl/curl.h>
#include <curlpp/cURLpp.hpp>
#include <jsoncpp/json/json.h>
......