Skip to content

Fix OpenJPEG version in cmake scripts#24749

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
FantasqueX:fix-openjpeg-version
Dec 22, 2023
Merged

Fix OpenJPEG version in cmake scripts#24749
asmorkalov merged 1 commit intoopencv:4.xfrom
FantasqueX:fix-openjpeg-version

Conversation

@FantasqueX
Copy link
Copy Markdown
Contributor

@FantasqueX FantasqueX commented Dec 22, 2023

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.

https://github.com/uclouvain/openjpeg/blob/master/cmake/OpenJPEGConfig.cmake.in

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

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`.
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 tested manually with Ubuntu.

@asmorkalov asmorkalov merged commit 2320eef into opencv:4.x Dec 22, 2023
@asmorkalov asmorkalov added this to the 4.9.0 milestone Dec 22, 2023
@asmorkalov asmorkalov self-assigned this Dec 22, 2023
@asmorkalov asmorkalov mentioned this pull request Jan 19, 2024
@FantasqueX FantasqueX deleted the fix-openjpeg-version branch June 28, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants