diff options
author | Alex Kent Hajnal <[email protected]> | 2024-05-17 18:16:23 -0400 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2024-05-21 19:17:18 +0200 |
commit | 8414af176d732dfb8a2f93809f4361295bbfbdcb (patch) | |
tree | 1f0d1181b66195dfdc2c20b07663184eb7c0dd0c /CMakeLists.txt | |
parent | b74ce5928ca980e5b5a1e611404b32c22b174934 (diff) | |
download | tdelibs-8414af176d732dfb8a2f93809f4361295bbfbdcb.tar.gz tdelibs-8414af176d732dfb8a2f93809f4361295bbfbdcb.zip |
Adds WebP read support to kimgio
Signed-off-by: Alex Kent Hajnal <[email protected]>
(cherry picked from commit 347a546d9dfb3210bcf907c3c622d6843d2ae9ce)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 631e7a5a7..d03faf8aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,7 @@ option( WITH_IMAGETOPS_BINARY "Enable installation of imagetops binary" ${WITH_A option( WITH_LUA "Enable LUA support" ${WITH_ALL_OPTIONS} ) option( WITH_TIFF "Enable tiff support" ${WITH_ALL_OPTIONS} ) option( WITH_JASPER "Enable jasper (jpeg2k) support" ${WITH_ALL_OPTIONS} ) +option( WITH_WEBP "Enable WebP support" ${WITH_ALL_OPTIONS} ) option( WITH_OPENEXR "Enable openexr support" ${WITH_ALL_OPTIONS} ) option( WITH_UTEMPTER "Use utempter for utmp management" ${WITH_ALL_OPTIONS} ) option( WITH_AVAHI "Enable AVAHI support" ${WITH_ALL_OPTIONS} ) @@ -891,6 +892,32 @@ if( WITH_JASPER ) endif( WITH_JASPER ) +##### check for webp ############################ + +if( WITH_WEBP ) + pkg_search_module( WEBP libwebp ) + if( WEBP_FOUND ) + set( HAVE_WEBP 1 ) + else ( NOT WEBP_FOUND ) + check_include_file( "webp/decode.h" HAVE_WEBP_DECODE_H) + if ( HAVE_WEBP_DECODE_H ) + check_library_exists( webp WebPGetInfo "" HAVE_WEBP__WEBPGETINFO ) + check_library_exists( webp WebPDecodeARGBInto "" HAVE_WEBP__WEBPDECODEARGBINTO ) + check_library_exists( webp WebPDecodeBGRAInto "" HAVE_WEBP__WEBPDECODEBGRAINTO ) + if( HAVE_WEBP__WEBPGETINFO AND HAVE_WEBP__WEBPDECODEARGBINTO AND HAVE_WEBP__WEBPDECODEBGRAINTO ) + set( HAVE_WEBP 1 ) + endif( ) + endif( HAVE_WEBP_DECODE_H ) + endif( WEBP_FOUND ) + if ( HAVE_WEBP ) + set( WEBP_LIBRARIES webp ) + message( STATUS "WebP support enabled" ) + else ( NOT HAVE_WEBP ) + tde_message_fatal( "WebP support requested, but not found on your system" ) + endif( HAVE_WEBP) +endif( WITH_WEBP ) + + ##### check for openexr ######################### if( WITH_OPENEXR ) |