summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlex Kent Hajnal <[email protected]>2024-05-17 18:16:23 -0400
committerSlávek Banko <[email protected]>2024-05-21 16:51:54 +0200
commit347a546d9dfb3210bcf907c3c622d6843d2ae9ce (patch)
treec20e7ab075804a350305442a105d848fc2232478 /CMakeLists.txt
parent7d228ae9aae48bda07d995f3c84debadbc2c5c95 (diff)
downloadtdelibs-347a546d9dfb3210bcf907c3c622d6843d2ae9ce.tar.gz
tdelibs-347a546d9dfb3210bcf907c3c622d6843d2ae9ce.zip
Adds WebP read support to kimgio
Signed-off-by: Alex Kent Hajnal <[email protected]>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
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 )