summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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 )