mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +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)
|
if(HAVE_OPENJPEG)
|
||||||
status(" JPEG 2000:" OpenJPEG_FOUND
|
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})"
|
ELSE "build (ver ${OPENJPEG_VERSION})"
|
||||||
)
|
)
|
||||||
elseif(HAVE_JASPER)
|
elseif(HAVE_JASPER)
|
||||||
|
@ -202,6 +202,7 @@ if(WITH_OPENJPEG)
|
|||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(HAVE_OPENJPEG YES)
|
set(HAVE_OPENJPEG YES)
|
||||||
|
set(OPENJPEG_VERSION "${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}")
|
||||||
message(STATUS "Found system OpenJPEG: ${OPENJPEG_LIBRARIES} "
|
message(STATUS "Found system OpenJPEG: ${OPENJPEG_LIBRARIES} "
|
||||||
"(found version \"${OPENJPEG_VERSION}\")")
|
"(found version \"${OPENJPEG_VERSION}\")")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user