From 561273a2f88306072750283b28d763959cd58652 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 2 Jan 2021 04:45:34 +0400 Subject: [PATCH] Add external_kwayland module --- external/CMakeLists.txt | 3 +++ external/kwayland/CMakeLists.txt | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 external/kwayland/CMakeLists.txt diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index dca143e..3f976d2 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -34,6 +34,9 @@ if (add_hunspell_library) endif() add_checked_subdirectory(iconv) add_checked_subdirectory(jpeg) +if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) + add_checked_subdirectory(kwayland) +endif() add_checked_subdirectory(lz4) if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) add_checked_subdirectory(materialdecoration) diff --git a/external/kwayland/CMakeLists.txt b/external/kwayland/CMakeLists.txt new file mode 100644 index 0000000..beb28f9 --- /dev/null +++ b/external/kwayland/CMakeLists.txt @@ -0,0 +1,39 @@ +# This file is part of Desktop App Toolkit, +# a set of libraries for developing nice desktop applications. +# +# For license and copyright information please follow this link: +# https://github.com/desktop-app/legal/blob/master/LEGAL + +if (DESKTOP_APP_USE_PACKAGED) + add_library(external_kwayland INTERFACE IMPORTED GLOBAL) + add_library(desktop-app::external_kwayland ALIAS external_kwayland) + + find_package(KF5Wayland REQUIRED) + target_link_libraries(external_kwayland INTERFACE KF5::WaylandClient) +else() + add_library(external_kwayland STATIC IMPORTED GLOBAL) + add_library(desktop-app::external_kwayland ALIAS external_kwayland) + + find_library(KWAYLAND_LIBRARY libKF5WaylandClient.a) + set_target_properties(external_kwayland PROPERTIES + IMPORTED_LOCATION "${KWAYLAND_LIBRARY}" + ) + + target_include_directories(external_kwayland + INTERFACE + /usr/local/include/KF5 + /usr/local/include/KF5/KWayland/Client + ) + + target_link_static_libraries(external_kwayland + INTERFACE + wayland-client + ffi + ) + + target_link_libraries(external_kwayland + INTERFACE + ${qt_loc}/lib/libQt5Concurrent.a + desktop-app::external_qt + ) +endif()