Merge pull request #25883 from CrystalP/fix-slowscan
[xbmc.git] / cmake / modules / FindWaylandProtocols.cmake
blob1c9461482b893dfe2302cdcec56b50cb71aaa842
1 # FindWaylandProtocols
2 # --------------------
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)
14 endif()
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
21   REQUIRED_VARS
22     PC_WAYLAND_PROTOCOLS_FOUND
23     WAYLAND_PROTOCOLS_DIR
24   VERSION_VAR
25     PC_WAYLAND_PROTOCOLS_VERSION)