conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
958 stars 1.76k forks source link

[question] Hardcoded OpenCV compilation option "WITH_OPENGL" #25084

Open remisphere opened 2 months ago

remisphere commented 2 months ago

What is your question?

Hello, I am a beginner in both Conan and OpenGL (and not an expert in C++ to boot), so I apologize if the workaround is obvious.

I would like to know if there is a reason the OpenGL support of the OpenCV package is hardcoded to False; my guess is that since the OpenGL package only exists in a /system version, it is too unpredictable to be reproducible? Unless it was never added because nobody uses that feature (which would surprise me a bit, given that there is an option to use Vulkan)?

My question thus boils down to would it be conceivable to add a with_opengl option to the package, is it unnecessary because there is some other kind of configuration I am not aware of, or do I have no other choice than to clone the recipe for my specific environment? Thanks

valgur commented 2 months ago

@SpaceIm Do you know whether the WITH_OPENGL option has been intentionally kept as disabled?

SpaceIm commented 2 months ago

I guess because it was not that obvious to manage based on other options/dependencies: it makes sense only if Qt with OpenGL backend or GTK with gltglext or Win32UI are enabled, so you have to be able to detect all those things in configure (or validate) to manage this option.

Nobody took the time to implement it properly in the recipe.

remisphere commented 2 months ago

Thanks for the quick answer. So it indeed is because some packages' versioning is left to the system rather than fully controlled by Conan, and fixing this would need cooperation between the Qt, GTK, Win32UI and OpenCV recipe options ?

I will work without it then, I don't have the expertise to propose a fix. Should the issue be closed ?