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 Jasper
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Nov 9, 2018
1 parent 3e48434 commit e0efb87
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmake/OpenCVFindLibsGrfmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,23 @@ if(WITH_JASPER)
if(BUILD_JASPER)
ocv_clear_vars(JASPER_FOUND)
else()
if(HUNTER_ENABLED)
hunter_add_package(jasper)
find_package(jasper CONFIG REQUIRED)

set(JASPER_FOUND TRUE)
set(JASPER_LIBRARY jasper::libjasper)
set(JASPER_LIBRARIES ${JASPER_LIBRARY})
get_target_property(
JASPER_INCLUDE_DIR
jasper::libjasper
INTERFACE_INCLUDE_DIRECTORIES
)
else()

include(FindJasper)

endif()
endif()

if(NOT JASPER_FOUND)
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 @@ -332,6 +332,10 @@ if("@JPEG_FOUND@")
find_dependency(JPEG CONFIG)
endif()

if("@JASPER_FOUND@")
find_dependency(jasper CONFIG)
endif()

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

0 comments on commit e0efb87

Please sign in to comment.