1 #=============================================================================
3 #=============================================================================
4 # Find the native WebP headers and libraries.
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 #=============================================================================
11 # Look for the header file.
15 FIND_PATH(WEBP_INCLUDE_DIR NAMES webp/decode.h)
17 if(NOT WEBP_INCLUDE_DIR)
20 MARK_AS_ADVANCED(WEBP_INCLUDE_DIR)
22 # Look for the library.
23 FIND_LIBRARY(WEBP_LIBRARY NAMES webp)
24 MARK_AS_ADVANCED(WEBP_LIBRARY)
26 # handle the QUIETLY and REQUIRED arguments and set WEBFOUND_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)
31 SET(WEBP_LIBRARIES ${WEBP_LIBRARY})
32 SET(WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR})