summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 3 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3eef32e..aad36f97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -112,17 +112,9 @@ include(ZSTDCodec)
# libwebp
set(WEBP_SUPPORT FALSE)
-find_path(WEBP_INCLUDE_DIR webp/decode.h)
-find_library(WEBP_LIBRARY NAMES webp)
-if (WEBP_INCLUDE_DIR AND WEBP_LIBRARY)
- set(WEBP_LIBRARIES ${WEBP_LIBRARY})
- set(WEBP_FOUND TRUE)
- message(STATUS "Found WEBP library: ${WEBP_LIBRARY}")
-else()
- set(WEBP_FOUND FALSE)
-endif()
-option(webp "use libwebp (required for WEBP compression)" ${WEBP_FOUND})
-if (webp AND WEBP_FOUND)
+find_package(WebP)
+option(webp "use libwebp (required for WEBP compression)" ${WebP_FOUND})
+if (webp AND WebP_FOUND)
set(WEBP_SUPPORT TRUE)
endif()
@@ -220,9 +212,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc
if(JPEG12_INCLUDE_DIR)
list(APPEND TIFF_INCLUDES ${JPEG12_INCLUDE_DIR})
endif()
-if(WEBP_INCLUDE_DIR)
- list(APPEND TIFF_INCLUDES ${WEBP_INCLUDE_DIR})
-endif()
# Libraries required by libtiff
set(TIFF_LIBRARY_DEPS)
@@ -232,9 +221,6 @@ endif()
if(JPEG12_LIBRARIES)
list(APPEND TIFF_LIBRARY_DEPS ${JPEG12_LIBRARIES})
endif()
-if(WEBP_LIBRARIES)
- list(APPEND TIFF_LIBRARY_DEPS ${WEBP_LIBRARIES})
-endif()
report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS)