Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,15 @@ include_directories(
# Find required packages
find_package(Threads REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread program_options)
find_package(jsoncpp REQUIRED)
find_package(jsoncpp QUIET)
if(NOT TARGET JsonCpp::JsonCpp)
# jsoncpp's CMake files are missing (Arch) or too old to define this target
find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONCPP REQUIRED IMPORTED_TARGET jsoncpp)
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
set_target_properties(JsonCpp::JsonCpp PROPERTIES
INTERFACE_LINK_LIBRARIES PkgConfig::JSONCPP)
endif()

# Check for the presence of an include file and report an error if not found
#
Expand Down
Loading