Try to find restclient-cpp if its CMake config is not found.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
9882a15704
commit
255afcea02
|
@ -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(jsoncpp REQUIRED CONFIG) # 1.7.4 (Debian buster) has no version.
|
||||||
find_package(CURL 7.52 REQUIRED)
|
find_package(CURL 7.52 REQUIRED)
|
||||||
find_package(Threads 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)
|
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.
|
# Write version in header.
|
||||||
configure_file (
|
configure_file (
|
||||||
"${PROJECT_SOURCE_DIR}/src/version.hpp.in"
|
"${PROJECT_SOURCE_DIR}/src/version.hpp.in"
|
||||||
|
|
Loading…
Reference in New Issue