fix(build): Optional XKB

This commit is contained in:
Michael Carlberg 2016-11-30 14:26:11 +01:00
parent d67515d575
commit f6ae5bd191
3 changed files with 30 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#pragma once #pragma once
#if ENABLE_I3 && ENABLE_MPD && ENABLE_NETWORK && ENABLE_ALSA #if ENABLE_I3 && ENABLE_MPD && ENABLE_NETWORK && ENABLE_ALSA && WITH_XKB
#error "Support has been enabled for all optional modules" #error "Support has been enabled for all optional modules"
#endif #endif
@ -12,6 +12,9 @@
#if not ENABLE_NETWORK #if not ENABLE_NETWORK
#include "modules/meta/timer_module.inl" #include "modules/meta/timer_module.inl"
#endif #endif
#if not WITH_XKB
#include "modules/meta/static_module.inl"
#endif
POLYBAR_NS POLYBAR_NS
@ -59,6 +62,9 @@ namespace modules {
#if not ENABLE_ALSA #if not ENABLE_ALSA
DEFINE_UNSUPPORTED_MODULE(volume_module, "internal/volume"); DEFINE_UNSUPPORTED_MODULE(volume_module, "internal/volume");
#endif #endif
#if not WITH_XKB
DEFINE_UNSUPPORTED_MODULE(xkeyboard_module, "internal/xkeyboard");
#endif
} }
POLYBAR_NS_END POLYBAR_NS_END

View File

@ -19,6 +19,25 @@ if(NOT ENABLE_I3)
list(REMOVE_ITEM SOURCES modules/i3.cpp utils/i3.cpp) list(REMOVE_ITEM SOURCES modules/i3.cpp utils/i3.cpp)
endif() endif()
if(NOT WITH_XCOMPOSITE)
list(REMOVE_ITEM SOURCES x11/composite.cpp)
endif()
if(NOT WITH_XDAMAGE)
list(REMOVE_ITEM SOURCES x11/damage.cpp)
endif()
if(NOT WITH_XRANDR)
list(REMOVE_ITEM SOURCES x11/randr.cpp)
endif()
if(NOT WITH_XRENDER)
list(REMOVE_ITEM SOURCES x11/render.cpp)
endif()
if(NOT WITH_XSYNC)
list(REMOVE_ITEM SOURCES x11/sync.cpp)
endif()
if(NOT WITH_XKB)
list(REMOVE_ITEM SOURCES x11/xkb.cpp modules/xkeyboard.cpp)
endif()
# }}} # }}}
# Locate dependencies {{{ # Locate dependencies {{{

View File

@ -23,7 +23,6 @@
#include "modules/temperature.hpp" #include "modules/temperature.hpp"
#include "modules/text.hpp" #include "modules/text.hpp"
#include "modules/xbacklight.hpp" #include "modules/xbacklight.hpp"
#include "modules/xkeyboard.hpp"
#include "modules/xwindow.hpp" #include "modules/xwindow.hpp"
#include "modules/xworkspaces.hpp" #include "modules/xworkspaces.hpp"
#include "utils/process.hpp" #include "utils/process.hpp"
@ -41,8 +40,11 @@
#if ENABLE_ALSA #if ENABLE_ALSA
#include "modules/volume.hpp" #include "modules/volume.hpp"
#endif #endif
#if WITH_XKB
#include "modules/xkeyboard.hpp"
#endif
#if not(ENABLE_I3 && ENABLE_MPD && ENABLE_NETWORK && ENABLE_ALSA) #if not(ENABLE_I3 && ENABLE_MPD && ENABLE_NETWORK && ENABLE_ALSA && WITH_XKB)
#include "modules/unsupported.hpp" #include "modules/unsupported.hpp"
#endif #endif