From e9e496ffb64d83a55162d38ffc6d87a364bb6a95 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 20 Aug 2021 09:07:09 +0300 Subject: Added WebP decoding using libwebp --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 73e2b8d4..262bbcb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ option (ENABLE_MPG123 "Use mpg123 for decoding MPEG audio" ON) option (ENABLE_RELATIVE_EMBED "Resources should always be found via relative path" OFF) option (ENABLE_RESIZE_DRAW "Force window to redraw during resizing" ${DEFAULT_RESIZE_DRAW}) option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF) +option (ENABLE_WEBP "Use libwebp to decode .webp images (via pkg-config)" ON) option (ENABLE_WINDOWPOS_FIX "Set position after showing window (workaround for SDL bug)" OFF) option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF) @@ -315,6 +316,10 @@ if (ENABLE_MPG123 AND MPG123_FOUND) target_compile_definitions (app PUBLIC LAGRANGE_ENABLE_MPG123=1) target_link_libraries (app PUBLIC PkgConfig::MPG123) endif () +if (ENABLE_WEBP AND WEBP_FOUND) + target_compile_definitions (app PUBLIC LAGRANGE_ENABLE_WEBP=1) + target_link_libraries (app PUBLIC PkgConfig::WEBP) +endif () if (ENABLE_IDLE_SLEEP) target_compile_definitions (app PUBLIC LAGRANGE_ENABLE_IDLE_SLEEP=1) endif () -- cgit v1.2.3