Enable chafa only if ImageMagick is found

This commit is contained in:
Linus Dierheimer
2022-05-29 16:23:56 +02:00
parent 743bc07bad
commit 032ba375b6
+8 -4
View File
@@ -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()