Add python3-setuptools dependency for python 3.12
[platform/upstream/opencv.git] / cmake / OpenCVFindWebP.cmake
1 #=============================================================================
2 # Find WebP library
3 #=============================================================================
4 # Find the native WebP headers and libraries.
5 #
6 #  WEBP_INCLUDE_DIRS - where to find webp/decode.h, etc.
7 #  WEBP_LIBRARIES    - List of libraries when using webp.
8 #  WEBP_FOUND        - True if webp is found.
9 #=============================================================================
10
11 # Look for the header file.
12
13 unset(WEBP_FOUND)
14
15 FIND_PATH(WEBP_INCLUDE_DIR NAMES webp/decode.h)
16
17 if(NOT WEBP_INCLUDE_DIR)
18     unset(WEBP_FOUND)
19 else()
20     MARK_AS_ADVANCED(WEBP_INCLUDE_DIR)
21
22     # Look for the library.
23     FIND_LIBRARY(WEBP_LIBRARY NAMES webp)
24     MARK_AS_ADVANCED(WEBP_LIBRARY)
25
26     # handle the QUIETLY and REQUIRED arguments and set WEBP_FOUND to TRUE if
27     # all listed variables are TRUE
28     INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
29     FIND_PACKAGE_HANDLE_STANDARD_ARGS(WebP DEFAULT_MSG WEBP_LIBRARY WEBP_INCLUDE_DIR)
30
31     SET(WEBP_LIBRARIES ${WEBP_LIBRARY})
32     SET(WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR})
33 endif()