summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-03-07 15:46:22 -0500
committerScott Murray <scott.murray@konsulko.com>2022-03-07 15:50:02 -0500
commitbe95c2a9466d03dda01cb882a70458aac81f36e4 (patch)
treed32e477a91cfc9c78316dd5a69473e02a692004c /app
parentcb34b2e7e8916f83b1af8282ed689856a8c40231 (diff)
Changes: - Remove the autobuild scripts and config.xml used by the app framework widget build. - Update the CMake files to just build a "xdg-cluster-receiver" binary and install it into /usr/bin by default. - Bumped agl-compositor protocols version requirement to 0.0.20 to work with current AGL. - Remove the code in main.cpp that handled reading the WebSocket command-line arguments and passing them to binding related code. Bug-AGL: SPEC-4283 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I8c9bd3af9ce16f29f24282b89985c0d4d5d9c922
Diffstat (limited to 'app')
-rw-r--r--app/CMakeLists.txt35
1 files changed, 15 insertions, 20 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index a2b13a2..b4efe2b 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -1,5 +1,5 @@
###########################################################################
-# Copyright 2018 Konsulko Group
+# Copyright 2018,2022 Konsulko Group
# Copyright 2020 Collabora, Ltd.
#
# Author: Scott Murray <scott.murray@konsulko.com>
@@ -18,19 +18,24 @@
# limitations under the License.
###########################################################################
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+project(xdg-cluster-receiver VERSION 2.0.0 LANGUAGES CXX)
+
+if(CMAKE_VERSION VERSION_LESS "3.7.0")
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+endif()
+set(OE_QMAKE_PATH_EXTERNAL_HOST_BINS $ENV{OE_QMAKE_PATH_HOST_BINS})
+
set(CMAKE_CXX_STANDARD 14)
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)
+pkg_check_modules(AGL_COMPOSITOR_PROTOCOLS REQUIRED agl-compositor-0.0.20-protocols)
+pkg_get_variable(AGL_COMPOSITOR_PROTOCOLS_PKGDATADIR agl-compositor-0.0.20-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
@@ -39,7 +44,6 @@ add_custom_command(
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
@@ -56,7 +60,6 @@ add_custom_command(
DEPENDS ${AGL_COMPOSITOR_PROTOCOLS_PATH}/agl-shell-desktop.xml
)
-
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
pkg_check_modules(GSTREAMER_PLUGINS_BASE REQUIRED gstreamer-plugins-base-1.0)
pkg_check_modules(GSTREAMER_VIDEO REQUIRED gstreamer-video-1.0)
@@ -74,7 +77,6 @@ add_custom_command(
DEPENDS ${WAYLAND_PROTOCOLS_BASE}/stable/xdg-shell/xdg-shell.xml
)
-
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/app/xdg-shell-client-protocol.h
COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header
@@ -91,7 +93,7 @@ add_custom_command(
DEPENDS ${WAYLAND_PROTOCOLS_BASE}/stable/xdg-shell/xdg-shell.xml
)
-add_executable(${TARGET_NAME}
+add_executable(${PROJECT_NAME}
main.cpp
agl-shell-desktop-protocol.c
agl-shell-desktop-client-protocol.h
@@ -107,16 +109,7 @@ include_directories(
"${GSTREAMER_VIDEO_INCLUDE_DIRS}"
)
-set_target_properties(${TARGET_NAME} PROPERTIES
- LABELS "EXECUTABLE"
- PREFIX ""
- COMPILE_FLAGS "${EXTRAS_CFLAGS} -DFOR_AFB_BINDING"
- LINK_FLAGS "${BINDINGS_LINK_FLAG}"
- LINK_LIBRARIES "${EXTRAS_LIBRARIES}"
- OUTPUT_NAME "${TARGET_NAME}"
-)
-
-target_link_libraries(${TARGET_NAME}
+target_link_libraries(${PROJECT_NAME}
${GSTREAMER_LIBRARIES}
"${GSTREAMER_PLUGINS_BASE_LIBRARIES}"
"${GSTREAMER_PLUGINS_BAD_LIBRARIES}"
@@ -124,3 +117,5 @@ target_link_libraries(${TARGET_NAME}
${WAYLAND_CLIENT_LIBRARIES}
-lgstwayland-1.0
)
+
+install(TARGETS ${PROJECT_NAME} DESTINATION bin)