Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Don't link libOpenImageIO against OpenCV #4363

Merged
merged 1 commit into from
Aug 16, 2024

Commits on Aug 12, 2024

  1. build: Don't link libOpenImageIO against OpenCV

    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>
    lgritz committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    81db421 View commit details
    Browse the repository at this point in the history