diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2021-07-01 13:39:29 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2021-07-01 14:16:50 +0300 |
commit | b5e988c9e7b7a4b9b61d0f546b8bbdc9b5795e02 (patch) | |
tree | 17506b81ba6d448fba5bc3c9719799a5607fe21f /app/CMakeLists.txt | |
parent | b587bf9d453f29656c2a52bc486881c0e3cb67c6 (diff) |
CmakeList.txt: use pkg-config to retrieve the protocols pathneedlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin_12.92.0marlin_12.91.0marlin_12.90.1marlin/12.93.0marlin/12.92.0marlin/12.91.0marlin/12.90.113.93.012.93.012.92.012.91.012.90.1
Bug-AGL: SPEC-3423
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I86d14a7e42a65713df25faf8d10d6e1c79297504
Diffstat (limited to 'app/CMakeLists.txt')
-rw-r--r-- | app/CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 9cdbaa9..3456f6d 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -28,6 +28,10 @@ find_package(Qt5Gui ${QT_MIN_VERSION} CONFIG REQUIRED Private) 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}) + qt5_add_resources(RESOURCES alexa-viewer.qrc) PROJECT_TARGET_ADD(alexa-viewer) @@ -35,26 +39,26 @@ PROJECT_TARGET_ADD(alexa-viewer) 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 ) add_executable(${TARGET_NAME} |