mirror of
https://github.com/opencv/opencv.git
synced 2026-09-11 04:43:22 -05:00
a859f3feff9cac77a4602ac1026fe1266cf8e2ce
When a user disables a bundled image-codec dependency (e.g. BUILD_ZLIB=OFF) to supply an external build but find_package() cannot locate it, OpenCVFindLibsGrfmt.cmake silently falls back to compiling the bundled 3rdparty version. As reported in the issue, this is misleading: the editable ZLIB_LIBRARY_DEBUG/RELEASE cache entries have no effect after the fallback and nothing points the user at the real knob (ZLIB_ROOT / ZLIB_DIR). Emit a message(WARNING) in each fallback branch, guarded by NOT BUILD_<lib>, so the built-in fallback is no longer silent when the user explicitly opted out of the bundled build. The warning names the correct search variables for that library and points to the CMake find_package / Find<lib> documentation. Applied consistently to the zlib, libjpeg, libtiff, libpng and libwebp fallback branches. The existing fallback behavior is intentionally left unchanged, so configurations that rely on the built-in fallback continue to build. Fixes #26746
OpenCV: Open Source Computer Vision Library
Resources
- Homepage: https://opencv.org
- Courses: https://opencv.org/courses
- Docs: https://docs.opencv.org/4.x/
- Q&A forum: https://forum.opencv.org
- previous forum (read only): http://answers.opencv.org
- Issue tracking: https://github.com/opencv/opencv/issues
- Additional OpenCV functionality: https://github.com/opencv/opencv_contrib
- Donate to OpenCV: https://opencv.org/support/
Contributing
Please read the contribution guidelines before starting work on a pull request.
Summary of the guidelines:
- One pull request per issue;
- Choose the right base branch;
- Include tests and documentation;
- Clean up "oops" commits before submitting;
- Follow the coding style guide.
Additional Resources
- Submit your OpenCV-based project for inclusion in Community Friday on opencv.org
- Subscribe to the OpenCV YouTube Channel featuring OpenCV Live, an hour-long streaming show
- Follow OpenCV on LinkedIn for daily posts showing the state-of-the-art in computer vision & AI
- Apply to be an OpenCV Volunteer to help organize events and online campaigns as well as amplify them
- Follow OpenCV on Mastodon in the Fediverse
- Follow OpenCV on Twitter
- OpenCV.ai: Computer Vision and AI development services from the OpenCV team.
Description
Languages
C++
87.6%
C
3.2%
Python
2.9%
CMake
2%
Java
1.5%
Other
2.6%