diff --git a/CMakeLists.txt b/CMakeLists.txt index ad0bdc1d..8ddda944 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,6 +236,14 @@ foreach(I_FILE RANGE ${WEBP_SIMD_FILES_TO_INCLUDE_RANGE}) ) endforeach() +if(WEBP_BUILD_GIF2WEBP AND NOT GIF_FOUND) + set(WEBP_BUILD_GIF2WEBP OFF) +endif() + +if(WEBP_BUILD_ANIM_UTILS AND NOT GIF_FOUND) + set(WEBP_BUILD_ANIM_UTILS OFF) +endif() + # Build the executables if asked for. if(WEBP_BUILD_ANIM_UTILS OR WEBP_BUILD_CWEBP OR WEBP_BUILD_DWEBP OR WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP OR WEBP_BUILD_VWEBP OR @@ -292,10 +300,6 @@ if(WEBP_BUILD_CWEBP) install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() -if(WEBP_BUILD_GIF2WEBP AND NOT GIF_FOUND) - unset(WEBP_BUILD_GIF2WEBP CACHE) -endif() - if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") @@ -407,10 +411,6 @@ if(WEBP_BUILD_WEBP_JS) target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN) endif() -if(WEBP_BUILD_ANIM_UTILS AND NOT GIF_FOUND) - unset(WEBP_BUILD_ANIM_UTILS CACHE) -endif() - if(WEBP_BUILD_ANIM_UTILS) # anim_diff include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS}