diff --git a/CMakeLists.txt b/CMakeLists.txt index 1902f0e618..975a402f8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -320,8 +320,11 @@ if (WITH_SYSTEM_PROVIDED_3PARTY) set(GFLAGS_USE_TARGET_NAMESPACE ON) find_package(gflags REQUIRED) + find_package(PkgConfig) + pkg_check_modules(jansson REQUIRED IMPORTED_TARGET jansson) + add_library(jansson::jansson ALIAS PkgConfig::jansson) + find_package(expat CONFIG REQUIRED) - find_package(jansson CONFIG REQUIRED) find_package(pugixml REQUIRED) find_package(utf8cpp REQUIRED) endif()