summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVincent Rabaud <vrabaud@google.com>2019-06-27 11:36:07 +0200
committerVincent Rabaud <vrabaud@google.com>2019-07-01 10:48:54 +0200
commitbf00c15b2318776fe7057cee33018b18b33abbc0 (patch)
treec7179d1979a29292ce86220cc6f01ab3c791ca3c /CMakeLists.txt
parenta788b49897f7424ddfbc1676da7ed5297fda9e70 (diff)
downloadlibwebp-bf00c15b2318776fe7057cee33018b18b33abbc0.tar.gz
Add CMake option for bittrace.
Change-Id: I9f09eb2c0afdac41e94bc10dfedd1fd004c45731
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
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)