-
Notifications
You must be signed in to change notification settings - Fork 574
add OpenCV 4.12.0 with optimization support for non-Intel and with (non-hermetic) Video I/O and HighGUI support #6153
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
base: main
Are you sure you want to change the base?
Conversation
|
@bazel-io skip_check unstable_url |
|
Hello @Ryang20718, modules you maintain (opencv) have been updated in this PR. |
fe02502 to
a85e77d
Compare
| cc_import( | ||
| name = "gtk3", | ||
| system_provided = True, | ||
| interface_library = select({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can gtk not be built with bazel?
I understand that it may take a lot more effort to build with bazel, but that's why I originally submitted one for opencv.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably can, but it has numerous dependencies. I'll have to investigate that. In the meantime, I'll remove these imports, introduce a label flag, as @UebelAndre suggested, so that users can provide their own GTK3 dependency, restore full compatibility with Bazel 7, as everything else, except HighGUI on Linux, works on Bazel 7 and is fully hermetic (i.e. the only "3rd party" dependencies are system ones, such as AVFoundation on Mac), and remove the default dependency of main OpenCV target on HighGUI on Linux to avoid build errors for users who don't provide GTK3 and don't care about HighGUI at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you be able to remove this file completely if you're using the label flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if that's the case, should all the extra modules and things still be needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been removed and put into a test module where it's used to provide GTK3 system dependency over label_flag to test this mechanism. See the presubmit.yml file.
1f0fdc8 to
eb057e6
Compare
fbfb76b to
f9fbdac
Compare
…on-hermetic) Video I/O and HighGUI support
- only HighGUI module on Linux requires Bazel 8.x
…zel file in the test module
…odule, regardless of the OS
- ATM, BCR does not support GTK3, so a label_flag is used to allow users
to inject their own GTK3 dependency if needed.
- also, in the test module, rename the linux-gtk-deps.BUILD.bazel to
ubuntu-gtk-deps.BUILD.bazel to be more specific about where it works.
- other Linux distributions may have GTK3 packages installed in
different locations.
f9fbdac to
dde0de6
Compare
|
|
||
| write_file( | ||
| name = "_highgui_config.hpp", | ||
| out = "opencv_highgui_config.hpp", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered creating overlay/opencv_highgui_config.hpp
where the content is an #ifdef chain for the various OSs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was to mimic whatever CMake does in the original project.
Also, in the future, once we have Qt in BCR, a Qt backend could be added. And, just like Gtk3 backend, Qt backend could be used on any platform, not just Linux.
Notice that Gtk3 depends on :have_gtk3, which can be true on any platform - you can use Gtk3 on Windows and MacOS - you just need to provide your label that provides Gtk3 dependency (BCR doesn't have Gtk3).
|
@UebelAndre could you do another review? |
No description provided.