From f7a6e5ba9829077293c2daaafcc995cc1afd2d42 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Sun, 13 May 2018 12:13:34 +0200 Subject: [PATCH] refactor(build): Build wihtout xkb The only reason polybar couldn't build without xkb is because the xkeyboard module's source file was not removed during compilation. xkeyboard already has an entry in unsupported.hpp This effectively makes xcb-util-xkb optional --- cmake/02-opts.cmake | 1 + src/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/cmake/02-opts.cmake b/cmake/02-opts.cmake index 18839214..728a3878 100644 --- a/cmake/02-opts.cmake +++ b/cmake/02-opts.cmake @@ -9,6 +9,7 @@ checklib(ENABLE_MPD "pkg-config" libmpdclient) checklib(ENABLE_NETWORK "cmake" Libiw) checklib(ENABLE_PULSEAUDIO "pkg-config" libpulse) checklib(ENABLE_PULSEAUDIO "binary" pulseaudio) +checklib(WITH_XKB "pkg-config" xcb-xkb) checklib(WITH_XRM "pkg-config" xcb-xrm) checklib(WITH_XRANDR_MONITORS "pkg-config" "xcb-randr>=1.12") checklib(WITH_XCURSOR "pkg-config" "xcb-cursor") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8f02f049..78a0666a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,6 +49,7 @@ if(NOT WITH_XCOMPOSITE) endif() if(NOT WITH_XKB) list(REMOVE_ITEM files x11/extensions/xkb.cpp) + list(REMOVE_ITEM files modules/xkeyboard.cpp) endif() if(NOT WITH_XRM) list(REMOVE_ITEM files x11/xresources.cpp)