facecam2d/cmake/FindWebP.cmake
Epicalert 4ce0e0e10d
Add support for webp textures
This allows for models to use lossy textures with an alpha channel,
none of the formats supported by stb_image.h could do this.
2021-02-06 21:19:33 +08:00

10 lines
332 B
CMake

find_path( WEBP_INCLUDE_DIR NAMES webp/decode.h )
find_library( WEBP_LIBRARY NAMES webp PATHS /usr/lib /usr/lib64 /lib /lib64 /usr/local/lib )
if (WEBP_INCLUDE_DIR AND WEBP_LIBRARY)
set(WEBP_INCLUDE_DIR ${WEBP_INCLUDE_DIR})
set(WEBP_LIBRARIES ${WEBP_LIBRARY})
set( WEBP_FOUND "TRUE" )
endif (WEBP_INCLUDE_DIR AND WEBP_LIBRARY)