summaryrefslogtreecommitdiffstats
path: root/app/CMakeLists.txt
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-06-17 15:53:22 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-07-06 16:19:44 +0300
commit233faba31d4ed8b3a4d6e758275b2103a5c69ef3 (patch)
treeee7c78b6ba5cbe1996d48bf4e46472b79bdc19c2 /app/CMakeLists.txt
parent843114c08eabcd51a58c94c7e9130652b86b1449 (diff)
Conversion to using agl-compositorjellyfish_9.99.2jellyfish/9.99.29.99.2
Bug-AGL: SPEC-3382 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I1d9bed80473069782f5ffd8b60669aeefdbeca67
Diffstat (limited to 'app/CMakeLists.txt')
-rw-r--r--app/CMakeLists.txt35
1 files changed, 32 insertions, 3 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 3911e6a..e99daa7 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -24,22 +24,51 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(OE_QMAKE_PATH_EXTERNAL_HOST_BINS $ENV{OE_QMAKE_PATH_HOST_BINS})
find_package(Qt5 COMPONENTS Core Gui QuickControls2 QuickWidgets REQUIRED)
+find_package(Qt5Gui ${QT_MIN_VERSION} CONFIG REQUIRED Private)
find_package(PkgConfig REQUIRED)
+find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
qt5_add_resources(RESOURCES cluster-gauges.qrc images/images.qrc)
PROJECT_TARGET_ADD(cluster-gauges)
+add_custom_command(
+ OUTPUT agl-shell-client-protocol.h
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header
+ < ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell.xml
+ > ${CMAKE_SOURCE_DIR}/app/agl-shell-client-protocol.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell.xml
+)
+
+add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/app/agl-shell-client-protocol.h
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header
+ < ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell.xml
+ > ${CMAKE_SOURCE_DIR}/app/agl-shell-client-protocol.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell.xml
+)
+
+add_custom_command(
+ OUTPUT agl-shell-protocol.c
+ COMMAND ${WAYLAND_SCANNER_EXECUTABLE} code
+ < ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell.xml
+ > ${CMAKE_BINARY_DIR}/app/agl-shell-protocol.c
+ DEPENDS ${CMAKE_SOURCE_DIR}/app/protocol/agl-shell.xml
+)
+
add_executable(${TARGET_NAME}
main.cpp
+ agl-shell-protocol.c
+ agl-shell-client-protocol.h
${RESOURCES}
)
-pkg_check_modules(QLIBWINMGR REQUIRED qlibwindowmanager)
pkg_check_modules(QTAPPFW REQUIRED qtappfw-signal-composer)
pkg_check_modules(GLIB REQUIRED glib-2.0)
+pkg_check_modules(WAYLAND_CLIENT REQUIRED wayland-client)
include_directories(
+ include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
${QTAPPFW_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
)
@@ -47,7 +76,7 @@ include_directories(
set_target_properties(${TARGET_NAME} PROPERTIES
LABELS "EXECUTABLE"
PREFIX ""
- COMPILE_FLAGS "${QLIBWINMGR_FLAGS} ${QTAPPFW_FLAGS} ${GLIB_FLAGS} ${EXTRAS_CFLAGS} -DFOR_AFB_BINDING"
+ COMPILE_FLAGS "${QTAPPFW_FLAGS} ${GLIB_FLAGS} ${EXTRAS_CFLAGS} -DFOR_AFB_BINDING"
LINK_FLAGS "${BINDINGS_LINK_FLAG}"
LINK_LIBRARIES "${EXTRAS_LIBRARIES}"
OUTPUT_NAME "${TARGET_NAME}"
@@ -56,7 +85,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES
target_link_libraries(${TARGET_NAME}
Qt5::QuickControls2
Qt5::QuickWidgets
- ${QLIBWINMGR_LIBRARIES}
${QTAPPFW_LIBRARIES}
${GLIB_LDFLAGS}
+ ${WAYLAND_CLIENT_LIBRARIES}
)