From e5237c14cb7fefe70a47aaf8e020ae38c6db76d6 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Fri, 22 Apr 2022 21:29:14 +0200 Subject: [PATCH] Fix build without any image magick enabled --- CMakeLists.txt | 2 +- src/logo/image/image.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1229d83bf..6ef61d145 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.1.0) # Threads::Threads project(fastfetch - VERSION 1.3.0 + VERSION 1.3.1 LANGUAGES C ) diff --git a/src/logo/image/image.c b/src/logo/image/image.c index b5b60c965..957b59ceb 100644 --- a/src/logo/image/image.c +++ b/src/logo/image/image.c @@ -268,8 +268,6 @@ FFLogoImageResult ffLogoPrintImageImpl(FFinstance* instance, FFLogoRequestData* return printSuccessful ? FF_LOGO_IMAGE_RESULT_SUCCESS : FF_LOGO_IMAGE_RESULT_RUN_ERROR; } -#endif //FF_HAVE_IMAGEMAGICK{6, 7} - static int getCacheFD(FFLogoRequestData* requestData, const char* fileName) { uint32_t cacheDirLength = requestData->cacheDir.length; @@ -396,3 +394,11 @@ bool ffLogoPrintImageIfExists(FFinstance* instance, FFLogoType type) ffStrbufDestroy(&requestData.cacheDir); return result == FF_LOGO_IMAGE_RESULT_SUCCESS; } + +#else //FF_HAVE_IMAGEMAGICK{6, 7} +bool ffLogoPrintImageIfExists(FFinstance* instance, FFLogoType type) +{ + FF_UNUSED(instance); + return false; +} +#endif //FF_HAVE_IMAGEMAGICK{6, 7}