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

highgui: wayland: if dependency is missing, "NO" message will help to install them. #25495

Closed
Kumataro opened this issue Apr 27, 2024 · 0 comments · Fixed by #25496
Closed

highgui: wayland: if dependency is missing, "NO" message will help to install them. #25495

Kumataro opened this issue Apr 27, 2024 · 0 comments · Fixed by #25496
Labels

Comments

@Kumataro
Copy link
Contributor

Describe the feature and motivation

  • OpenCV 4.x branch ( 2cd3304 )
  • Ubuntu 24.04
  • GCC 13.2

Evenif dependency is missing, we cannnot know what dependency is missing.

opencv/CMakeLists.txt

Lines 1368 to 1384 in 2cd3304

if(WITH_WAYLAND OR HAVE_WAYLAND)
if(HAVE_WAYLAND_CLIENT)
status(" Wayland Client:" "YES (ver ${WAYLAND_CLIENT_VERSION})")
endif()
if(HAVE_WAYLAND_CURSOR)
status(" Wayland Cursor:" "YES (ver ${WAYLAND_CURSOR_VERSION})")
endif()
if(HAVE_WAYLAND_PROTOCOL)
status(" Wayland Protocol:" "YES (ver ${WAYLAND_PROTOCOL_VERSION})")
endif()
if(HAVE_WAYLAND_EGL)
status(" Wayland EGL:" "YES (ver ${WAYLAND_EGL_VERSION})")
endif()
if(HAVE_XKBCOMMON)
status(" Xkbcommon:" "YES (ver ${XKBCOMMON_VERSION})")
endif()
endif()

It is better to show "NO" if dependency libraries are missing.

- if(HAVE_WAYLAND_CLIENT)
-   status("    Wayland Client:" "YES (ver ${WAYLAND_CLIENT_VERSION})")
- endif()
+ status("    Wayland Client:" HAVE_WAYLAND_CLIENT THEN "YES (ver ${WAYLAND_CLIENT_VERSION})" ELSE "NO")

Case) WITH_WAYLAND is not set.

  GUI:                           NO
    GTK+:                        NO
    VTK support:                 NO

Case) WITH_WAYLAND is set, and all dependencies are installed.

  GUI:                           Wayland
    Wayland:                     (Experimental) YES
      Wayland Client:            YES (ver 1.22.0)
      Wayland Cursor:            YES (ver 1.22.0)
      Wayland Protocols:         YES (ver 1.34)
      Xkbcommon:                 YES (ver 1.6.0)
      Wayland EGL(Option):       NO
    GTK+:                        NO
    VTK support:                 NO

Case) WITH_WAYLAND is set, but Xkbcommon is missing, so Wayland backend is disabled.

  GUI:                           NO
    Wayland:                     NO
      Wayland Client:            YES (ver 1.22.0)
      Wayland Cursor:            YES (ver 1.22.0)
      Wayland Protocols:         YES (ver 1.34)
      Xkbcommon:                 NO
      Wayland EGL(Option):       NO
    GTK+:                        NO
    VTK support:                 NO

Additional context

No response

@Kumataro Kumataro changed the title highgui: wayland: if dependency is missing, "NO" message will helps to install them. highgui: wayland: if dependency is missing, "NO" message will help to install them. Apr 27, 2024
asmorkalov pushed a commit that referenced this issue Apr 29, 2024
highgui: wayland: show "NO" status if dependency is missing #25496

Close #25495

- [doc] Add document to enable Wayland highgui-backend in ubuntu 24.04.
- [build] Show "NO" status instead of version if dependency library is missing.
- [build] Fix to find Wayland EGL.
- [fix] Add some callback stub functions to suppress build warning.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant