From 032ba375b63dd9331e716e9e0ce26d15fe943706 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sun, 29 May 2022 16:23:56 +0200 Subject: [PATCH] Enable chafa only if ImageMagick is found --- CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2335b296f..d1c3e80b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,11 +333,15 @@ if(ENABLE_ZLIB) endif() if(ENABLE_CHAFA) - pkg_check_modules(CHAFA chafa>=1.10) - if(CHAFA_FOUND) - target_compile_definitions(libfastfetch PRIVATE FF_HAVE_CHAFA=1) + if(IMAGEMAGICK6_FOUND OR IMAGEMAGICK7_FOUND) + pkg_check_modules(CHAFA chafa>=1.10) + if(CHAFA_FOUND) + target_compile_definitions(libfastfetch PRIVATE FF_HAVE_CHAFA=1) + else() + message(WARNING "Package chafa>=1.10 not found. Building without support.") + endif() else() - message(WARNING "Package chafa>=1.10 not found. Building without support.") + message(WARNING "Chafa not enabled, because neither ImageMagick6 nor ImageMagick7 is found. Builting without support.") endif() endif()