mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 12:40:05 +08:00
Fix OpenJPEG version in cmake scripts
Currently, if OpenJPEG is found, only version information in summary is correct and the information right after `find_package(OpenJPEG)` is wrong. ``` -- Found system OpenJPEG: openjp2 (found version "") ``` The reason is OpenJPEGConfig.cmake only sets `OPENJPEG_MAJOR_VERSION`, `OPENJPEG_MINOR_VERSION` and `OPENJPEG_BUILD_VERSION` but not `OPENJPEG_VERSION`.
This commit is contained in:
parent
a050285058
commit
4ee4479cd7
@ -1415,7 +1415,7 @@ endif()
|
||||
|
||||
if(HAVE_OPENJPEG)
|
||||
status(" JPEG 2000:" OpenJPEG_FOUND
|
||||
THEN "OpenJPEG (ver ${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION})"
|
||||
THEN "OpenJPEG (ver ${OPENJPEG_VERSION})"
|
||||
ELSE "build (ver ${OPENJPEG_VERSION})"
|
||||
)
|
||||
elseif(HAVE_JASPER)
|
||||
|
@ -202,6 +202,7 @@ if(WITH_OPENJPEG)
|
||||
endif()
|
||||
else()
|
||||
set(HAVE_OPENJPEG YES)
|
||||
set(OPENJPEG_VERSION "${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}")
|
||||
message(STATUS "Found system OpenJPEG: ${OPENJPEG_LIBRARIES} "
|
||||
"(found version \"${OPENJPEG_VERSION}\")")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user