Description: Install also the tools with the upstream build system
Author: Gianfranco Costamagna <locutusofborg@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1023482
Forwarded: no
Last-Update: 2023-09-15

--- libwebp-1.3.2.orig/CMakeLists.txt
+++ libwebp-1.3.2/CMakeLists.txt
@@ -707,6 +712,7 @@ if(WEBP_BUILD_ANIM_UTILS)
     webpdemux
     ${WEBP_DEP_GIF_LIBRARIES})
   target_include_directories(anim_diff PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
+  install(TARGETS anim_diff RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 
   # anim_dump
   include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS} ${WEBP_DEP_GIF_INCLUDE_DIRS})
@@ -723,6 +729,7 @@ if(WEBP_BUILD_ANIM_UTILS)
     webpdemux
     ${WEBP_DEP_GIF_LIBRARIES})
   target_include_directories(anim_dump PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
+  install(TARGETS anim_dump RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 endif()
 
 if(WEBP_BUILD_FUZZTEST)
#@@ -631,11 +631,13 @@ if(WEBP_BUILD_EXTRAS)
#   target_include_directories(get_disto PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
#                                                ${CMAKE_CURRENT_BINARY_DIR}/src)
# 
#+  install(TARGETS get_disto RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
#   # webp_quality
#   add_executable(webp_quality ${WEBP_QUALITY_SRCS})
#   target_link_libraries(webp_quality exampleutil imagedec extras)
#   target_include_directories(webp_quality PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
#                                                   ${CMAKE_CURRENT_BINARY_DIR})
#+  install(TARGETS webp_quality RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# 
#   # vwebp_sdl
#   find_package(SDL)
#@@ -647,6 +649,7 @@ if(WEBP_BUILD_EXTRAS)
#                         ${CMAKE_CURRENT_BINARY_DIR}/src ${SDL_INCLUDE_DIR})
#     set(WEBP_HAVE_SDL 1)
#     target_compile_definitions(vwebp_sdl PUBLIC WEBP_HAVE_SDL)
#+    install(TARGETS vwebp_sdl RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
#   endif()
# endif()
# 
#@@ -675,6 +678,7 @@ if(WEBP_BUILD_WEBP_JS)
#          -sEXPORTED_RUNTIME_METHODS=cwrap")
#     set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp)
#     target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
#+    install(TARGETS webp_js RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
#   endif()
# 
#   # WASM version
#@@ -687,6 +691,7 @@ if(WEBP_BUILD_WEBP_JS)
#        -sEXPORTED_FUNCTIONS=_WebPToSDL -sINVOKE_RUN=0 \
#        -sEXPORTED_RUNTIME_METHODS=cwrap")
#   target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
#+  install(TARGETS webp_wasm RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# 
#   target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN)
# endif()
