3 # Find wayland-protocols
5 # This will define the following variables::
7 # WAYLAND_PROTOCOLS_DIR - directory containing the additional Wayland protocols
8 # from the wayland-protocols package
10 find_package(PkgConfig)
11 pkg_check_modules(PC_WAYLAND_PROTOCOLS wayland-protocols)
12 if(PC_WAYLAND_PROTOCOLS_FOUND)
13 pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
16 # Promote to cache variables so all code can access it
17 set(WAYLAND_PROTOCOLS_DIR ${WAYLAND_PROTOCOLS_DIR} CACHE INTERNAL "")
19 include(FindPackageHandleStandardArgs)
20 find_package_handle_standard_args(WaylandProtocols
22 PC_WAYLAND_PROTOCOLS_FOUND
25 PC_WAYLAND_PROTOCOLS_VERSION)