Skip to content

Commit

Permalink
build: mark bluetooth as Linux-specific
Browse files Browse the repository at this point in the history
  • Loading branch information
alebastr committed Feb 19, 2024
1 parent 543290a commit a95b6a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
#ifdef HAVE_LIBSNDIO
#include "modules/sndio.hpp"
#endif
#if defined(__linux__)
#include "modules/bluetooth.hpp"
#endif
#ifdef HAVE_LOGIND_INHIBITOR
#include "modules/inhibitor.hpp"
#endif
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ src_files = files(
'src/ALabel.cpp',
'src/AIconLabel.cpp',
'src/AAppIconLabel.cpp',
'src/modules/bluetooth.cpp',
'src/modules/custom.cpp',
'src/modules/disk.cpp',
'src/modules/idle_inhibitor.cpp',
Expand All @@ -188,7 +187,6 @@ src_files = files(
)

man_files = files(
'man/waybar-bluetooth.5.scd',
'man/waybar-custom.5.scd',
'man/waybar-disk.5.scd',
'man/waybar-idle-inhibitor.5.scd',
Expand All @@ -205,6 +203,7 @@ if is_linux
add_project_arguments('-DHAVE_SYSTEMD_MONITOR', language: 'cpp')
src_files += files(
'src/modules/battery.cpp',
'src/modules/bluetooth.cpp',
'src/modules/cffi.cpp',
'src/modules/cpu.cpp',
'src/modules/cpu_frequency/common.cpp',
Expand All @@ -217,6 +216,7 @@ if is_linux
)
man_files += files(
'man/waybar-battery.5.scd',
'man/waybar-bluetooth.5.scd',
'man/waybar-cffi.5.scd',
'man/waybar-cpu.5.scd',
'man/waybar-memory.5.scd',
Expand Down
2 changes: 2 additions & 0 deletions src/factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
return new waybar::modules::Sndio(id, config_[name]);
}
#endif
#if defined(__linux__)
if (ref == "bluetooth") {
return new waybar::modules::Bluetooth(id, config_[name]);
}
#endif
#ifdef HAVE_LOGIND_INHIBITOR
if (ref == "inhibitor") {
return new waybar::modules::Inhibitor(id, bar_, config_[name]);
Expand Down

0 comments on commit a95b6a3

Please sign in to comment.