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

Commit e0efb87

Browse files
committed
Use Hunter to download Jasper
1 parent 3e48434 commit e0efb87

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

cmake/OpenCVFindLibsGrfmt.cmake

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,23 @@ if(WITH_JASPER)
172172
if(BUILD_JASPER)
173173
ocv_clear_vars(JASPER_FOUND)
174174
else()
175+
if(HUNTER_ENABLED)
176+
hunter_add_package(jasper)
177+
find_package(jasper CONFIG REQUIRED)
178+
179+
set(JASPER_FOUND TRUE)
180+
set(JASPER_LIBRARY jasper::libjasper)
181+
set(JASPER_LIBRARIES ${JASPER_LIBRARY})
182+
get_target_property(
183+
JASPER_INCLUDE_DIR
184+
jasper::libjasper
185+
INTERFACE_INCLUDE_DIRECTORIES
186+
)
187+
else()
188+
175189
include(FindJasper)
190+
191+
endif()
176192
endif()
177193

178194
if(NOT JASPER_FOUND)

cmake/templates/OpenCVConfig.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,10 @@ if("@JPEG_FOUND@")
332332
find_dependency(JPEG CONFIG)
333333
endif()
334334

335+
if("@JASPER_FOUND@")
336+
find_dependency(jasper CONFIG)
337+
endif()
338+
335339
# AWP: Qt5 dependencies -- start
336340
if("@Qt5Core_FOUND@")
337341
find_dependency(Qt5Core)

0 commit comments

Comments
 (0)