aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/FindWaylandProtocols.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/FindWaylandProtocols.cmake b/cmake/FindWaylandProtocols.cmake
index 17859ed7..73d8548a 100644
--- a/cmake/FindWaylandProtocols.cmake
+++ b/cmake/FindWaylandProtocols.cmake
@@ -6,8 +6,9 @@
if(NOT WIN32)
find_package(PkgConfig)
- pkg_check_modules(PKG_WAYLAND_PROTOCOLS QUIET wayland-protocols)
- set(WAYLAND_PROTOCOLS_PATH ${PKG_WAYLAND_PROTOCOLS_PREFIX}/share/wayland-protocols)
+ pkg_check_modules(WAYLAND_PROTOCOLS_PATH REQUIRED wayland-protocols)
+ execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
+ OUTPUT_VARIABLE WAYLAND_PROTOCOLS_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
find_package_handle_standard_args(WAYLAND DEFAULT_MSG WAYLAND_PROTOCOLS_PATH)
mark_as_advanced(WAYLAND_PROTOCOLS_PATH)
endif()