dyne / frei0r

A large collection of free and portable video plugins
https://frei0r.dyne.org/
GNU General Public License v2.0
419 stars 90 forks source link

Fix build for opencv4 #112

Closed mingwandroid closed 3 years ago

jaromil commented 3 years ago

Thanks for the contribution!

I'm sorry to say this patch fixes only the autoconf build and only for systems with OpenCV v4.

The most shipped version of OpenCV is still 3 and in pkg-config its ID is opencv.

If applied this patch will break builds targeting opencv v3.

To be merged, it should:

  1. support both versions of OpenCV, perhaps via build flags.
  2. be implemented into the cmake build system too
ddennedy commented 3 years ago

@jaromil I am fairly sure the CMake build was already addressed in #101. But I agree the autoconf build should perhaps not require opencv4 because Debian stable, Ubuntu 18.04 LTS, and CentOS 8 are still on 3.

mingwandroid commented 3 years ago

Thanks for the feedback. I'll setup testing envs for each build system and make sure I break nothing.

I'm keen to add this (and then cutshot) packages to conda-forge by the way. I hope you approve of that!

mingwandroid commented 3 years ago

OK, I think this is good now. The CMake build already finds OpenCV4 just fine so I don't think there's anything to do there.

mingwandroid commented 3 years ago

I implemented preference for opencv4 pkg-config, and fallback to opencv pkg-config btw rather than allowing user specification. I hope this is ok?

jaromil commented 3 years ago

Awesome! thanks for all your attention to details.

ddennedy commented 3 years ago

This change broke my build:

configure: error: Package requirements (opencv > 1.0.0) were not met:

No package 'opencv' found

OpenCV should not be required! I will revert it, and you can try again.

ddennedy commented 3 years ago

Nevermind, I found the fix simple enough but then when I was testing with OpenCV 4.2, I found the OpenCV-based plugins were not actually built and installed! That was also easy and included in 3d3c4a6 .

mingwandroid commented 3 years ago

Sorry about that, glad you got it and more fixed. I an very keen to explore more opencv things with frei0r!