diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-03-22 10:45:24 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-03-22 10:45:24 +0100 |
| commit | 2c039595110ec3b5804cb6f12615ba9e77f25c0d (patch) | |
| tree | 83d58db437d790cf2e69af4a174e8a923188ba57 /src | |
| parent | 1a8d6662cefb05bb13e9214b087639bbd03ee950 (diff) | |
CMake: check for presence of needed Wayland protocol source files
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 741d1f5b8..02a6dbd81 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -650,6 +650,22 @@ if (UNIX AND OPTION_USE_WAYLAND) set(PROTOCOLS /usr/share/wayland-protocols) endif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD") endif (NOT (CMAKE_VERSION VERSION_LESS 3.4)) + if (NOT(EXISTS ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml)) + message(WARNING "Install necessary file ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml") + endif () + if (NOT(EXISTS ${PROTOCOLS}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml)) + message(WARNING + "Install necessary file ${PROTOCOLS}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml") + endif () + if (NOT(EXISTS ${PROTOCOLS}/unstable/text-input/text-input-unstable-v3.xml)) + message(WARNING + "Install necessary file ${PROTOCOLS}/unstable/text-input/text-input-unstable-v3.xml") + endif () + if (NOT((EXISTS ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml) AND + (EXISTS ${PROTOCOLS}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml) AND + (EXISTS ${PROTOCOLS}/unstable/text-input/text-input-unstable-v3.xml))) + message(FATAL_ERROR "*** Terminating: one or more required file(s) missing.") + endif () add_custom_command( OUTPUT xdg-shell-protocol.c xdg-shell-client-protocol.h COMMAND wayland-scanner private-code ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.c |
