aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2021-07-01 17:08:55 +0300
committerMarius Vlad <marius.vlad@collabora.com>2021-07-01 17:08:55 +0300
commitcb34b2e7e8916f83b1af8282ed689856a8c40231 (patch)
treebb0bdcf75be239db2f26f2b00ea6dd36086a736f
parent849f6571b215a28301e5d04e20fea92a6eed0810 (diff)
Bug-AGL: SPEC-3423 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I380bfc5f53fabe83ebf71648cf6d4effc31d44ad
-rw-r--r--app/CMakeLists.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 9008b9e..a2b13a2 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -25,31 +25,35 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(PkgConfig REQUIRED)
find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
+pkg_check_modules(AGL_COMPOSITOR_PROTOCOLS REQUIRED agl-compositor-0.0.19-protocols)
+pkg_get_variable(AGL_COMPOSITOR_PROTOCOLS_PKGDATADIR agl-compositor-0.0.19-protocols pkgdatadir)
+set(AGL_COMPOSITOR_PROTOCOLS_PATH ${AGL_COMPOSITOR_PROTOCOLS_PKGDATADIR})
+
PROJECT_TARGET_ADD(xdg-cluster-receiver)
add_custom_command(
OUTPUT agl-shell-desktop-client-protocol.h
COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header
- < ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell-desktop.xml
+ < ${AGL_COMPOSITOR_PROTOCOLS_PATH}/agl-shell-desktop.xml
> ${CMAKE_SOURCE_DIR}/app/agl-shell-desktop-client-protocol.h
- DEPENDS ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell-desktop.xml
+ DEPENDS ${AGL_COMPOSITOR_PROTOCOLS_PATH}/agl-shell-desktop.xml
)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/app/agl-shell-desktop-client-protocol.h
COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header
- < ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell-desktop.xml
+ < ${AGL_COMPOSITOR_PROTOCOLS_PATH}/agl-shell-desktop.xml
> ${CMAKE_SOURCE_DIR}/app/agl-shell-desktop-client-protocol.h
- DEPENDS ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell-desktop.xml
+ DEPENDS ${AGL_COMPOSITOR_PROTOCOLS_PATH}/agl-shell-desktop.xml
)
add_custom_command(
OUTPUT agl-shell-desktop-protocol.c
COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
- < ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell-desktop.xml
+ < ${AGL_COMPOSITOR_PROTOCOLS_PATH}/agl-shell-desktop.xml
> ${CMAKE_BINARY_DIR}/app/agl-shell-desktop-protocol.c
- DEPENDS ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell-desktop.xml
+ DEPENDS ${AGL_COMPOSITOR_PROTOCOLS_PATH}/agl-shell-desktop.xml
)