From 5532976ea7bc025eedef52a639d77b6ca6af01a3 Mon Sep 17 00:00:00 2001 From: DioEgizio <83089242+DioEgizio@users.noreply.github.com> Date: Mon, 1 Dec 2025 21:36:19 +0100 Subject: [PATCH] fix: Add back fallback to pkgconfig for tomlplusplus fixes a regression in #4405 Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com> --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16468f5d3..197839893 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -338,6 +338,12 @@ if(NOT LibArchive_FOUND) endif() find_package(tomlplusplus 3.2.0 REQUIRED) +# fallback to pkgconfig, important especially as many distros package toml++ built with meson +if(NOT tomlplusplus_FOUND) + find_package(PkgConfig REQUIRED) + pkg_check_modules(tomlplusplus REQUIRED IMPORTED_TARGET tomlplusplus>=3.2.0) +endif() + find_package(ZLIB REQUIRED)