aboutsummaryrefslogtreecommitdiff
path: root/ports/freeimage/cmake/FindWEBP.cmake
blob: 9b8516e15673b66b384e1c58df633000c1ab1fc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# - Find WEBP
# Find the WEBP library 
# This module defines
#  WEBP_INCLUDE_DIRS, where to find webp/decode.h
#  WEBP_LIBRARIES, the libraries needed to use WEBP
#

find_path(WEBP_INCLUDE_DIRS
    NAMES webp/decode.h
)
mark_as_advanced(WEBP_INCLUDE_DIRS)

find_library(
    WEBP_LIBRARIES
    NAMES webp
)

find_library(WEBP_LIBRARY_RELEASE NAMES webp PATH_SUFFIXES lib)
find_library(WEBP_LIBRARY_DEBUG NAMES webpd PATH_SUFFIXES lib)
include(SelectLibraryConfigurations)
select_library_configurations(WEBP)

set(WEBP_LIBRARIES ${WEBP_LIBRARY})

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WEBP DEFAULT_MSG WEBP_INCLUDE_DIRS WEBP_LIBRARIES)