Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Commit

Permalink
Use Hunter to download WebP
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Nov 9, 2018
1 parent e0efb87 commit c255433
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmake/OpenCVFindLibsGrfmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,27 @@ if(WITH_WEBP)
if(BUILD_WEBP)
ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR)
else()
if(HUNTER_ENABLED)
hunter_add_package(WebP)
find_package(WebP CONFIG REQUIRED)
set(WEBP_FOUND TRUE)
set(HAVE_WEBP 1)
set(WEBP_LIBRARY WebP::webp)
set(WEBP_LIBRARIES ${WEBP_LIBRARY})

get_target_property(
WEBP_INCLUDE_DIR
WebP::webp
INTERFACE_INCLUDE_DIRECTORIES
)
else()

include(cmake/OpenCVFindWebP.cmake)
if(WEBP_FOUND)
set(HAVE_WEBP 1)
endif()

endif()
endif()
endif()

Expand Down
4 changes: 4 additions & 0 deletions cmake/templates/OpenCVConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ if("@JASPER_FOUND@")
find_dependency(jasper CONFIG)
endif()

if("@WEBP_FOUND@")
find_dependency(WebP CONFIG)
endif()

# AWP: Qt5 dependencies -- start
if("@Qt5Core_FOUND@")
find_dependency(Qt5Core)
Expand Down

0 comments on commit c255433

Please sign in to comment.