Skip to content

Add support for external libspng.#24718

Merged
asmorkalov merged 3 commits intoopencv:4.xfrom
asmorkalov:as/system_spng
Dec 20, 2023
Merged

Add support for external libspng.#24718
asmorkalov merged 3 commits intoopencv:4.xfrom
asmorkalov:as/system_spng

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov commented Dec 19, 2023

Fixes #24683
Related patch to libspng: randy408/libspng#264

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

@FantasqueX
Copy link
Copy Markdown
Contributor

Hi, thanks for your work. There are two problems in your PR.

  • BUILD_SPNG is not honored. if BUILD_SPNG=ON and SPNG_FOUND, spng library used by opencv is the found one instead of the built one.
  • spng supports two build system, cmake and meson. As a result, we should support both SPNGConfig.cmake and spng.pc.

I tried to solve the problem based on your work. You can check it at https://github.com/FantasqueX/opencv/tree/system-spng which tested on ArchLinux with both cmake and meson build system.

@asmorkalov
Copy link
Copy Markdown
Contributor Author

@FantasqueX Thanks a lot for the proposal. I cherry-picked your commit and fixed diagnostics messages. It works with CMake in all PNG/SPNG build/use-existing configuration.

@asmorkalov asmorkalov merged commit c928152 into opencv:4.x Dec 20, 2023
@asmorkalov asmorkalov mentioned this pull request Jan 19, 2024
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
Add support for external libspng. opencv#24718

Fixes opencv#24683
Related patch to libspng: randy408/libspng#264

### Pull Request Readiness Checklist

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

- [x] I agree to contribute to the project under Apache 2 License.
- [x] 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
- [x] The PR is proposed to the proper branch
- [x] 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
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.

Support using system libspng

3 participants