From a881d49d9d6c173e394d790b308d11fb421327d7 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Thu, 13 Sep 2018 16:12:31 +0200 Subject: [PATCH] doc(net): Indicate the wireless library used This helps us to more easily debug network issues because before it wasn't clear if a user had built polybar with the libnl or libiw adapter --- cmake/02-opts.cmake | 2 ++ cmake/05-summary.cmake | 2 +- include/settings.hpp.cmake | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/02-opts.cmake b/cmake/02-opts.cmake index 306d91a1..a044c4f0 100644 --- a/cmake/02-opts.cmake +++ b/cmake/02-opts.cmake @@ -9,8 +9,10 @@ checklib(ENABLE_MPD "pkg-config" libmpdclient) checklib(WITH_LIBNL "pkg-config" libnl-genl-3.0) if(WITH_LIBNL) checklib(ENABLE_NETWORK "pkg-config" libnl-genl-3.0) + set(WIRELESS_LIB "libnl") else() checklib(ENABLE_NETWORK "cmake" Libiw) + set(WIRELESS_LIB "wireless-tools") endif() checklib(ENABLE_PULSEAUDIO "pkg-config" libpulse) checklib(ENABLE_PULSEAUDIO "binary" pulseaudio) diff --git a/cmake/05-summary.cmake b/cmake/05-summary.cmake index 2801d8a7..b14d9c5e 100644 --- a/cmake/05-summary.cmake +++ b/cmake/05-summary.cmake @@ -17,7 +17,7 @@ colored_option(" alsa" ENABLE_ALSA) colored_option(" curl" ENABLE_CURL) colored_option(" i3" ENABLE_I3) colored_option(" mpd" ENABLE_MPD) -colored_option(" network" ENABLE_NETWORK) +colored_option(" network (${WIRELESS_LIB})" ENABLE_NETWORK) colored_option(" pulseaudio" ENABLE_PULSEAUDIO) colored_option(" xkeyboard" WITH_XKB) diff --git a/include/settings.hpp.cmake b/include/settings.hpp.cmake index e358d26f..47457326 100644 --- a/include/settings.hpp.cmake +++ b/include/settings.hpp.cmake @@ -21,6 +21,7 @@ #cmakedefine01 ENABLE_MPD #cmakedefine01 ENABLE_NETWORK #cmakedefine01 WITH_LIBNL +#define WIRELESS_LIB "@WIRELESS_LIB@" #cmakedefine01 ENABLE_I3 #cmakedefine01 ENABLE_CURL #cmakedefine01 ENABLE_PULSEAUDIO @@ -102,12 +103,13 @@ const auto version_details = [](const std::vector& args) { // clang-format off const auto print_build_info = [](bool extended = false) { printf("%s %s\n\n", APP_NAME, APP_VERSION); - printf("Features: %calsa %ccurl %ci3 %cmpd %cnetwork %cpulseaudio %cxkeyboard\n", + printf("Features: %calsa %ccurl %ci3 %cmpd %cnetwork(%s) %cpulseaudio %cxkeyboard\n", (ENABLE_ALSA ? '+' : '-'), (ENABLE_CURL ? '+' : '-'), (ENABLE_I3 ? '+' : '-'), (ENABLE_MPD ? '+' : '-'), (ENABLE_NETWORK ? '+' : '-'), + WIRELESS_LIB, (ENABLE_PULSEAUDIO ? '+' : '-'), (ENABLE_XKEYBOARD ? '+' : '-')); if (extended) {