From 549f5ad6828aa527af243889868d2ab21f39f81f Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Thu, 15 Apr 2021 20:46:25 +0200 Subject: [PATCH] Link against xkbcommon Otherwise the build fails with missing xkbcommon headers --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a9fcba..3d2c197 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,9 @@ find_package(WaylandScanner) find_package(QtWaylandScanner) find_package(Wayland 1.3 COMPONENTS Client Server) find_package(WaylandProtocols) +find_package(PkgConfig REQUIRED) + +pkg_check_modules(XKBCOMMON xkbcommon REQUIRED IMPORTED_TARGET) set_package_properties(Wayland PROPERTIES TYPE REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 85e4392..b53c938 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,7 +16,7 @@ ecm_qt_declare_logging_category(LAYER_SHELL_SOURCES ) add_library(LayerShellQtInterface SHARED qwaylandlayersurface.cpp interfaces/window.cpp interfaces/shell.cpp qwaylandlayershellintegration.cpp qwaylandlayershell.cpp ${LAYER_SHELL_SOURCES}) -target_link_libraries(LayerShellQtInterface PRIVATE Qt::Gui Qt::WaylandClientPrivate Qt::XkbCommonSupportPrivate Wayland::Client) +target_link_libraries(LayerShellQtInterface PRIVATE Qt::Gui Qt::WaylandClientPrivate Qt::XkbCommonSupportPrivate Wayland::Client PkgConfig::XKBCOMMON) target_include_directories(LayerShellQtInterface PUBLIC "$" INTERFACE "$" ) @@ -27,7 +27,7 @@ set_target_properties(LayerShellQtInterface PROPERTIES VERSION ${LAYERSHELLQT_ ) add_library(layer-shell SHARED qwaylandlayershellintegrationplugin.cpp) -target_link_libraries(layer-shell LayerShellQtInterface Qt::WaylandClient Qt::WaylandClientPrivate Qt::XkbCommonSupportPrivate Wayland::Client) +target_link_libraries(layer-shell LayerShellQtInterface Qt::WaylandClient Qt::WaylandClientPrivate Qt::XkbCommonSupportPrivate Wayland::Client PkgConfig::XKBCOMMON) ecm_generate_headers(LayerShellQt_HEADERS HEADER_NAMES