diff options
author | Christopher Degawa <ccom@randomderp.com> | 2021-06-14 01:13:47 -0500 |
---|---|---|
committer | James Zern <jzern@google.com> | 2021-06-16 16:55:45 +0000 |
commit | de3b4ba813c92935aae9709e8b191e6d653137ea (patch) | |
tree | 2e3fe22a8445aafd9e893a61f07ea572d4e19003 | |
parent | 7f09d3d13295b98121911dff17c3f5b216e9bc2a (diff) | |
download | libwebp-de3b4ba813c92935aae9709e8b191e6d653137ea.tar.gz |
CMake: add WEBP_BUILD_LIBWEBPMUX
Adds an additional option similar to configure's --enable-libwebpmux
to toggle building libwebpmux separate from the binaries
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Change-Id: I0443b84eea36d86791e2e421a6fc0070879a7bef
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 128235c2..94ffbc3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ option(WEBP_BUILD_GIF2WEBP "Build the gif2webp conversion tool." ON) option(WEBP_BUILD_IMG2WEBP "Build the img2webp animation tool." ON) option(WEBP_BUILD_VWEBP "Build the vwebp viewer tool." ON) option(WEBP_BUILD_WEBPINFO "Build the webpinfo command line tool." ON) +option(WEBP_BUILD_LIBWEBPMUX "Build the libwebpmux library." ON) option(WEBP_BUILD_WEBPMUX "Build the webpmux command line tool." ON) option(WEBP_BUILD_EXTRAS "Build extras." ON) option(WEBP_BUILD_WEBP_JS "Emscripten build of webp.js." OFF) @@ -384,6 +385,12 @@ foreach(I_FILE RANGE ${WEBP_SIMD_FILES_TO_INCLUDE_RANGE}) ${SIMD_COMPILE_FLAG}) endforeach() +if(NOT WEBP_BUILD_LIBWEBPMUX) + set(WEBP_BUILD_GIF2WEBP OFF) + set(WEBP_BUILD_IMG2WEBP OFF) + set(WEBP_BUILD_WEBPMUX OFF) +endif() + if(WEBP_BUILD_GIF2WEBP AND NOT GIF_FOUND) set(WEBP_BUILD_GIF2WEBP OFF) endif() @@ -456,7 +463,7 @@ if(WEBP_BUILD_CWEBP) install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() -if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) +if(WEBP_BUILD_LIBWEBPMUX) parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") add_library(libwebpmux ${WEBP_MUX_SRCS}) target_link_libraries(libwebpmux webp) |