Skip to content
Snippets Groups Projects
Select Git revision
  • ee9dffcd6673b891a0ca7bb0533094b9f5a9b07e
  • for-vairdraw default protected
  • multi-context-windows
3 results

FindWaylandProtocols.cmake

Blame
  • user avatar
    Jonas Ådahl authored and Camilla Berglund committed
    This implements support for the 'DISABLED' cursor mode, which
    effectively means locking the pointer to the surface. The cursor is also
    explicitly hidden.
    
    This adds two new build dependencies: wayland-scanner and
    wayland-protocols.
    
    Closes #708.
    cb08dc57
    History
    FindWaylandProtocols.cmake 915 B
    find_package(PkgConfig)
    
    pkg_check_modules(WaylandProtocols QUIET wayland-protocols>=${WaylandProtocols_FIND_VERSION})
    
    execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
                    OUTPUT_VARIABLE WaylandProtocols_PKGDATADIR
                    RESULT_VARIABLE _pkgconfig_failed)
    if (_pkgconfig_failed)
        message(FATAL_ERROR "Missing wayland-protocols pkgdatadir")
    endif()
    
    string(REGEX REPLACE "[\r\n]" "" WaylandProtocols_PKGDATADIR "${WaylandProtocols_PKGDATADIR}")
    
    find_package_handle_standard_args(WaylandProtocols
        FOUND_VAR
            WaylandProtocols_FOUND
        REQUIRED_VARS
            WaylandProtocols_PKGDATADIR
        VERSION_VAR
            WaylandProtocols_VERSION
        HANDLE_COMPONENTS
    )
    
    set(WAYLAND_PROTOCOLS_FOUND ${WaylandProtocols_FOUND})
    set(WAYLAND_PROTOCOLS_PKGDATADIR ${WaylandProtocols_PKGDATADIR})
    set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION})