Try to find restclient-cpp if its CMake config is not found.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tastytea 2019-12-25 22:50:25 +01:00
parent 9882a15704
commit 255afcea02
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -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"