Fix build without any image magick enabled

This commit is contained in:
Linus Dierheimer 2022-04-22 21:29:14 +02:00
parent 47d8ddad35
commit e5237c14cb
No known key found for this signature in database
GPG Key ID: 74FA57726CDD7B61
2 changed files with 9 additions and 3 deletions

View File

@ -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
)

View File

@ -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}