Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@Kumataro

Description

@Kumataro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions