From bf00c15b2318776fe7057cee33018b18b33abbc0 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Thu, 27 Jun 2019 11:36:07 +0200 Subject: Add CMake option for bittrace. Change-Id: I9f09eb2c0afdac41e94bc10dfedd1fd004c45731 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f4750e4..d5c2646a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,8 @@ option(WEBP_BUILD_WEBP_JS "Emscripten build of webp.js." OFF) option(WEBP_NEAR_LOSSLESS "Enable near-lossless encoding" ON) option(WEBP_ENABLE_SWAP_16BIT_CSP "Enable byte swap for 16 bit colorspaces." OFF) +set(WEBP_BITTRACE "0" CACHE STRING "Bit trace mode (0=none, 1=bit, 2=bytes)") +set_property(CACHE WEBP_BITTRACE PROPERTY STRINGS 0 1 2) # Option needed for handling Unicode file names on Windows. if(WIN32) @@ -55,6 +57,10 @@ if(WEBP_ENABLE_SWAP_16BIT_CSP) add_definitions(-DWEBP_SWAP_16BIT_CSP=1) endif() +if(NOT WEBP_BITTRACE STREQUAL "0") + add_definitions(-DBITTRACE=${WEBP_BITTRACE}) +endif() + if(WEBP_UNICODE) # Windows recommends setting both UNICODE and _UNICODE. add_definitions(-DUNICODE -D_UNICODE) -- cgit v1.2.1