diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5536922..8225dc4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -218,14 +218,14 @@ if(NOT SIMAGE_QUICKTIME_SUPPORT AND NOT SIMAGE_CGIMAGE_SUPPORT AND NOT SIMAGE_GD
   find_package(TIFF)
 
   set(HAVE_ZLIB ${ZLIB_FOUND})
-  set(HAVE_GIFLIB ${GIF_FOUND})
-  set(HAVE_JPEGLIB ${JPEG_FOUND})
-  set(HAVE_PNGLIB ${PNG_FOUND})
-  set(HAVE_TIFFLIB ${TIFF_FOUND})
+  set(HAVE_GIFLIB ${SIMAGE_GIF_SUPPORT})
+  set(HAVE_JPEGLIB ${SIMAGE_JPEG_SUPPORT})
+  set(HAVE_PNGLIB ${SIMAGE_PNG_SUPPORT})
+  set(HAVE_TIFFLIB ${SIMAGE_TIFF_SUPPORT})
 endif()
 
-set(HAVE_JASPER ${JASPER_FOUND})
-set(HAVE_VFW ${VFW_FOUND})
+set(HAVE_JASPER ${SIMAGE_JASPER_SUPPORT})
+set(HAVE_VFW ${SIMAGE_AVIENC_SUPPORT})
 
 check_include_files(guile/gh.h HAVE_GUILE_GH_H)
 check_include_files(inttypes.h HAVE_INTTYPES_H)
@@ -430,27 +430,27 @@ if(SIMAGE_GDIPLUS_SUPPORT)
   target_link_libraries(simage PRIVATE ${GDIPLUS_LIBRARIES})
 endif()
 
-if(GIF_FOUND)
+if(SIMAGE_GIF_SUPPORT)
   target_include_directories(simage PRIVATE ${GIF_INCLUDE_DIR})
   target_link_libraries(simage PRIVATE ${GIF_LIBRARIES})
 endif()
 
-if(JASPER_FOUND)
+if(SIMAGE_JASPER_SUPPORT)
   target_include_directories(simage PRIVATE ${JASPER_INCLUDE_DIR})
   target_link_libraries(simage PRIVATE ${JASPER_LIBRARIES})
 endif()
 
-if(JPEG_FOUND)
+if(SIMAGE_JPEG_SUPPORT)
   target_include_directories(simage PRIVATE ${JPEG_INCLUDE_DIR})
   target_link_libraries(simage PRIVATE ${JPEG_LIBRARIES})
 endif()
 
-if(OGGVORBIS_FOUND)
+if(SIMAGE_OGGVORBIS_SUPPORT)
   target_include_directories(simage PRIVATE ${OGGVORBIS_INCLUDE_DIRS})
   target_link_libraries(simage PRIVATE ${OGGVORBIS_LIBRARIES})
 endif()
 
-if(PNG_FOUND)
+if(SIMAGE_PNG_SUPPORT)
   target_include_directories(simage PRIVATE ${PNG_INCLUDE_DIR})
   target_link_libraries(simage PRIVATE ${PNG_LIBRARIES})
 endif()
@@ -459,22 +459,22 @@ if(SIMAGE_QIMAGE_SUPPORT)
   target_link_libraries(simage PRIVATE ${QT_LIBRARIES})
 endif()
 
-if(QUICKTIME_FOUND)
+if(SIMAGE_QUICKTIME_SUPPORT)
   target_include_directories(simage PRIVATE ${QUICKTIME_INCLUDE_DIR})
   target_link_libraries(simage PRIVATE ${QUICKTIME_LIBRARIES})
 endif()
 
-if(SNDFILE_FOUND)
+if(SIMAGE_SNDFILE_SUPPORT)
   target_include_directories(simage PRIVATE ${SNDFILE_INCLUDE_DIRS})
   target_link_libraries(simage PRIVATE ${SNDFILE_LIBRARIES})
 endif()
 
-if(TIFF_FOUND)
+if(SIMAGE_TIFF_SUPPORT)
   target_include_directories(simage PRIVATE ${TIFF_INCLUDE_DIR})
   target_link_libraries(simage PRIVATE ${TIFF_LIBRARY})
 endif()
 
-if(VFW_FOUND)
+if(SIMAGE_VFW_SUPPORT)
   target_link_libraries(simage PRIVATE ${VFW_LIBRARIES})
 endif()
 
