build: mark bluetooth as Linux-specific

This commit is contained in:
Aleksei Bavshin 2024-02-19 13:54:46 -08:00
parent 543290ab07
commit a95b6a39c9
No known key found for this signature in database
GPG Key ID: 4F071603387A382A
3 changed files with 6 additions and 2 deletions

View File

@ -82,7 +82,9 @@
#ifdef HAVE_LIBSNDIO #ifdef HAVE_LIBSNDIO
#include "modules/sndio.hpp" #include "modules/sndio.hpp"
#endif #endif
#if defined(__linux__)
#include "modules/bluetooth.hpp" #include "modules/bluetooth.hpp"
#endif
#ifdef HAVE_LOGIND_INHIBITOR #ifdef HAVE_LOGIND_INHIBITOR
#include "modules/inhibitor.hpp" #include "modules/inhibitor.hpp"
#endif #endif

View File

@ -162,7 +162,6 @@ src_files = files(
'src/ALabel.cpp', 'src/ALabel.cpp',
'src/AIconLabel.cpp', 'src/AIconLabel.cpp',
'src/AAppIconLabel.cpp', 'src/AAppIconLabel.cpp',
'src/modules/bluetooth.cpp',
'src/modules/custom.cpp', 'src/modules/custom.cpp',
'src/modules/disk.cpp', 'src/modules/disk.cpp',
'src/modules/idle_inhibitor.cpp', 'src/modules/idle_inhibitor.cpp',
@ -188,7 +187,6 @@ src_files = files(
) )
man_files = files( man_files = files(
'man/waybar-bluetooth.5.scd',
'man/waybar-custom.5.scd', 'man/waybar-custom.5.scd',
'man/waybar-disk.5.scd', 'man/waybar-disk.5.scd',
'man/waybar-idle-inhibitor.5.scd', 'man/waybar-idle-inhibitor.5.scd',
@ -205,6 +203,7 @@ if is_linux
add_project_arguments('-DHAVE_SYSTEMD_MONITOR', language: 'cpp') add_project_arguments('-DHAVE_SYSTEMD_MONITOR', language: 'cpp')
src_files += files( src_files += files(
'src/modules/battery.cpp', 'src/modules/battery.cpp',
'src/modules/bluetooth.cpp',
'src/modules/cffi.cpp', 'src/modules/cffi.cpp',
'src/modules/cpu.cpp', 'src/modules/cpu.cpp',
'src/modules/cpu_frequency/common.cpp', 'src/modules/cpu_frequency/common.cpp',
@ -217,6 +216,7 @@ if is_linux
) )
man_files += files( man_files += files(
'man/waybar-battery.5.scd', 'man/waybar-battery.5.scd',
'man/waybar-bluetooth.5.scd',
'man/waybar-cffi.5.scd', 'man/waybar-cffi.5.scd',
'man/waybar-cpu.5.scd', 'man/waybar-cpu.5.scd',
'man/waybar-memory.5.scd', 'man/waybar-memory.5.scd',

View File

@ -178,9 +178,11 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
return new waybar::modules::Sndio(id, config_[name]); return new waybar::modules::Sndio(id, config_[name]);
} }
#endif #endif
#if defined(__linux__)
if (ref == "bluetooth") { if (ref == "bluetooth") {
return new waybar::modules::Bluetooth(id, config_[name]); return new waybar::modules::Bluetooth(id, config_[name]);
} }
#endif
#ifdef HAVE_LOGIND_INHIBITOR #ifdef HAVE_LOGIND_INHIBITOR
if (ref == "inhibitor") { if (ref == "inhibitor") {
return new waybar::modules::Inhibitor(id, bar_, config_[name]); return new waybar::modules::Inhibitor(id, bar_, config_[name]);