diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f01338e..6a73789 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,9 +5,22 @@ find_package(Boost 1.62 REQUIRED COMPONENTS filesystem log) find_package(jsoncpp REQUIRED CONFIG) # 1.7.4 (Debian buster) has no version. find_package(CURL 7.52 REQUIRED) find_package(Threads REQUIRED) -find_package(restclient-cpp 0.5 REQUIRED CONFIG) +find_package(restclient-cpp 0.5 CONFIG) find_package(mastodon-cpp REQUIRED CONFIG) +if(NOT ${restclient-cpp_FOUND}) + find_file(restclient_h NAMES "restclient-cpp/restclient.h" + PATHS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") + if("${restclient_h}" STREQUAL "restclient_h-NOTFOUND") + message(FATAL_ERROR "Could not find restclient-cpp.") + else() + message(WARNING + "Your distribution of restclient-cpp doesn't contain the *Config.cmake " + "recipes, but the files seem to be in the standard directories. " + "Let's hope this works.") + endif() +endif() + # Write version in header. configure_file ( "${PROJECT_SOURCE_DIR}/src/version.hpp.in"