aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2020-10-23 18:48:57 -0700
committerGitHub <noreply@github.com>2020-10-23 18:48:57 -0700
commit7cbd810f4ebbfa5b6213e029e9561d5cb1c9a3bf (patch)
tree12cb7812f33284b0d7398f04940acc1a7e400167 /cmake
parent2524e9e0ef1f6e68f9ec85027114d7242465e08f (diff)
parent4cd12ddc02ed0d343a7f64b201d295972f110e75 (diff)
Merge pull request #18625 from lrusak/cmake-prefix-path
[cmake] bail out if waylandpp isn't found via pkg-config
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindWaylandpp.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/modules/FindWaylandpp.cmake b/cmake/modules/FindWaylandpp.cmake
index 3cfc282730..ba229d7ffc 100644
--- a/cmake/modules/FindWaylandpp.cmake
+++ b/cmake/modules/FindWaylandpp.cmake
@@ -11,12 +11,19 @@
# WAYLANDPP_SCANNER - path to wayland-scanner++
pkg_check_modules(PC_WAYLANDPP wayland-client++ wayland-egl++ wayland-cursor++ QUIET)
-pkg_check_modules(PC_WAYLANDPP_SCANNER wayland-scanner++ QUIET)
+
if(PC_WAYLANDPP_FOUND)
pkg_get_variable(PC_WAYLANDPP_PKGDATADIR wayland-client++ pkgdatadir)
+else()
+ message(SEND_ERROR "wayland-client++ not found via pkg-config")
endif()
+
+pkg_check_modules(PC_WAYLANDPP_SCANNER wayland-scanner++ QUIET)
+
if(PC_WAYLANDPP_SCANNER_FOUND)
pkg_get_variable(PC_WAYLANDPP_SCANNER wayland-scanner++ wayland_scannerpp)
+else()
+ message(SEND_ERROR "wayland-scanner++ not found via pkg-config")
endif()
find_path(WAYLANDPP_INCLUDE_DIR wayland-client.hpp PATHS ${PC_WAYLANDPP_INCLUDEDIR})