buils/cmake: use pkgconfig to find jsoncpp

The cmake module might not always be provided.

Change-Id: Ie0561da113f31a3cdf0cdd669ed73cde76b51c8a
This commit is contained in:
Adrien Béraud
2023-03-10 20:16:08 -05:00
parent 9c66dbd373
commit 89d4efbe18

View File

@ -476,8 +476,8 @@ else()
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
list(APPEND CMAKE_PREFIX_PATH ${CONTRIB_PATH})
find_package (jsoncpp CONFIG REQUIRED)
find_package (yaml-cpp CONFIG REQUIRED)
pkg_search_module (jsoncpp REQUIRED IMPORTED_TARGET jsoncpp)
pkg_search_module (fmt REQUIRED IMPORTED_TARGET fmt)
pkg_search_module (webrtcap IMPORTED_TARGET webrtc-audio-processing)
pkg_search_module (gnutls REQUIRED IMPORTED_TARGET gnutls)
@ -511,7 +511,7 @@ else()
PkgConfig::avcodec
PkgConfig::swresample
PkgConfig::swscale
jsoncpp
PkgConfig::jsoncpp
yaml-cpp
PkgConfig::fmt
PkgConfig::secp256k1