-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Don't link libOpenImageIO against OpenCV (#4363)
Fully linking OpenCV against libOpenImageIO is burdensome for people downstream, especially those who want a static version of libOpenImageIO. There were only three IBA functions that use OpenCV: to_OpenCV(), from_OpenCV(), and capture_image(), and all three are fairly short. Move them to a separate header, imagebufalgo_opencv.h, make them fully INLINE (so they don't actually produce object code in libOpenImageIO, which therefore does not need to link against OpenCV). Applications wanting these three functions should include this header and will be responsible themselves for ensuring that the include paths and linkage of their application makes provisions for finding and using OpenCV. All other applications don't need to deal with OpenCV dependency at all. Our own oiiotool (for --capture) and our python bindings still link against OpenCV to support this functionality (again, still as an optional dependency, enabled only if OpenCV is found at build time). But downstream apps using libOpenImageIO and who do not themselves need our OpenCV functioality now no longer need to link against OpenCV. We have removed capture_image() from the Python bindings -- Python scripts that need to capture live camera images can use OpenCV or any other capture API of their choice without going through OIIO. Signed-off-by: Larry Gritz <lg@larrygritz.com>
- Loading branch information
Showing
16 changed files
with
175 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.