You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jsoncpp has deprecated cmake build system in favor of meson. Distros / packages are switching over, and so the cmake config cannot be relied anymore. This is a problem on Homebrew for instance.
The pkgconfig is generated in both build systems, and so we can switch over, or at least add it as a fallback, but preferably the former for simplicity.
Something like this works:
find_package(PkgConfig REQUIRED)
pkg_check_modules(jsoncpp REQUIRED IMPORTED_TARGET jsoncpp)
add_library(jsoncpp_static ALIAS PkgConfig::jsoncpp) # Or preferably don't create the alias and use the imported target directly.