From e1ac838796b754296f700751567106487f5a3c8a Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Mon, 7 Feb 2022 23:52:21 -0500 Subject: [PATCH] [client] wayland: use `wayland-protocols` from submodule --- client/displayservers/Wayland/CMakeLists.txt | 3 +-- cmake/CheckSubmodule.cmake | 3 ++- repos/wayland-protocols | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 160000 repos/wayland-protocols diff --git a/client/displayservers/Wayland/CMakeLists.txt b/client/displayservers/Wayland/CMakeLists.txt index 735df425..fb3e94ff 100644 --- a/client/displayservers/Wayland/CMakeLists.txt +++ b/client/displayservers/Wayland/CMakeLists.txt @@ -51,8 +51,6 @@ target_include_directories(displayserver_Wayland ) find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner) -pkg_check_modules(WAYLAND_PROTOCOLS REQUIRED wayland-protocols>=1.15) -pkg_get_variable(WAYLAND_PROTOCOLS_BASE wayland-protocols pkgdatadir) macro(wayland_generate protocol_file output_file) add_custom_command(OUTPUT "${output_file}.h" @@ -68,6 +66,7 @@ macro(wayland_generate protocol_file output_file) target_sources(displayserver_Wayland PRIVATE "${output_file}.h" "${output_file}.c") endmacro() +set(WAYLAND_PROTOCOLS_BASE "${PROJECT_TOP}/repos/wayland-protocols") file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/wayland") include_directories("${CMAKE_BINARY_DIR}/wayland") wayland_generate( diff --git a/cmake/CheckSubmodule.cmake b/cmake/CheckSubmodule.cmake index 6e18abde..1ea0b4ff 100644 --- a/cmake/CheckSubmodule.cmake +++ b/cmake/CheckSubmodule.cmake @@ -2,7 +2,8 @@ if (EXISTS "${PROJECT_TOP}/.git" AND ( (NOT EXISTS "${PROJECT_TOP}/repos/cimgui/.git") OR (NOT EXISTS "${PROJECT_TOP}/repos/LGMP/.git") OR (NOT EXISTS "${PROJECT_TOP}/repos/PureSpice/.git") OR - (NOT EXISTS "${PROJECT_TOP}/repos/cimgui/imgui/.git") + (NOT EXISTS "${PROJECT_TOP}/repos/cimgui/imgui/.git") OR + (NOT EXISTS "${PROJECT_TOP}/repos/wayland-protocols/.git") )) message(FATAL_ERROR "Submodules are not initialized. Run\n\tgit submodule update --init --recursive") endif() diff --git a/repos/wayland-protocols b/repos/wayland-protocols new file mode 160000 index 00000000..d3249868 --- /dev/null +++ b/repos/wayland-protocols @@ -0,0 +1 @@ +Subproject commit d324986823519c15b2162fc3e0a720f349e43b0c