Change jsoncpp detection from CMake to pkg-config.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Upstream no longer provides jsoncppConfig*.cmake.
This commit is contained in:
parent
41f013820c
commit
df7bc1890e
|
@ -11,7 +11,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
|
||||||
option(BUILD_SHARED_LIBS "Build shared libraries." YES)
|
option(BUILD_SHARED_LIBS "Build shared libraries." YES)
|
||||||
|
|
||||||
project (mastorss
|
project (mastorss
|
||||||
VERSION 0.11.0
|
VERSION 0.11.1
|
||||||
DESCRIPTION "Another RSS to Mastodon bot."
|
DESCRIPTION "Another RSS to Mastodon bot."
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@ include(GNUInstallDirs)
|
||||||
|
|
||||||
# The minimum versions should be in Debian oldstable, if possible.
|
# The minimum versions should be in Debian oldstable, if possible.
|
||||||
find_package(Boost 1.62 REQUIRED COMPONENTS filesystem log regex)
|
find_package(Boost 1.62 REQUIRED COMPONENTS filesystem log regex)
|
||||||
find_package(jsoncpp REQUIRED CONFIG) # 1.7.4 (Debian buster) has no version.
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(jsoncpp REQUIRED IMPORTED_TARGET jsoncpp)
|
||||||
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 CONFIG)
|
find_package(restclient-cpp 0.5 CONFIG)
|
||||||
|
@ -31,7 +32,7 @@ file(GLOB sources *.cpp)
|
||||||
add_executable(mastorss ${sources})
|
add_executable(mastorss ${sources})
|
||||||
target_link_libraries(mastorss
|
target_link_libraries(mastorss
|
||||||
PRIVATE
|
PRIVATE
|
||||||
jsoncpp_lib restclient-cpp mastodonpp::mastodonpp
|
PkgConfig::jsoncpp restclient-cpp mastodonpp::mastodonpp
|
||||||
Boost::filesystem Boost::log Boost::regex)
|
Boost::filesystem Boost::log Boost::regex)
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
target_compile_definitions(mastorss PRIVATE "BOOST_ALL_DYN_LINK=1")
|
target_compile_definitions(mastorss PRIVATE "BOOST_ALL_DYN_LINK=1")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user