Skip to content

Commit

Permalink
Fix build without any image magick enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusDierheimer committed Apr 22, 2022
1 parent 47d8dda commit e5237c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)

Expand Down
10 changes: 8 additions & 2 deletions src/logo/image/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}

0 comments on commit e5237c1

Please sign in to comment.