polybar-dwm/include/config.hpp.cmake

87 lines
3.2 KiB
CMake
Raw Normal View History

#pragma once
2016-05-19 14:41:06 +00:00
2016-06-15 03:32:35 +00:00
#include <iostream>
2016-11-20 22:04:31 +00:00
#include <vector>
2016-06-15 03:32:35 +00:00
#include "version.hpp"
#define APP_NAME "@PROJECT_NAME@"
2016-06-15 03:32:35 +00:00
#define BASE_PATH "@PROJECT_SOURCE_DIR@"
2016-06-27 19:52:21 +00:00
#cmakedefine01 ENABLE_ALSA
#cmakedefine01 ENABLE_MPD
#cmakedefine01 ENABLE_NETWORK
#cmakedefine01 ENABLE_I3
2016-05-19 14:41:06 +00:00
2016-11-02 19:22:45 +00:00
#cmakedefine ENABLE_RANDR_EXT
#cmakedefine ENABLE_RENDER_EXT
#cmakedefine ENABLE_DAMAGE_EXT
2016-06-15 03:32:35 +00:00
2016-11-02 19:22:45 +00:00
#cmakedefine DEBUG_LOGGER
#cmakedefine VERBOSE_TRACELOG
#ifdef DEBUG
#cmakedefine01 DRAW_CLICKABLE_AREA_HINTS
2016-11-20 22:04:31 +00:00
#cmakedefine DRAW_CLICKABLE_AREA_HINTS_OFFSET_Y @DRAW_CLICKABLE_AREA_HINTS_OFFSET_Y @
#ifndef DRAW_CLICKABLE_AREA_HINTS_OFFSET_Y
#define DRAW_CLICKABLE_AREA_HINTS_OFFSET_Y 0
#endif
#endif
2016-05-19 14:41:06 +00:00
#define BUILDER_SPACE_TOKEN "%__"
2016-05-19 14:41:06 +00:00
#define ALSA_SOUNDCARD "@SETTING_ALSA_SOUNDCARD@"
#define BSPWM_SOCKET_PATH "@SETTING_BSPWM_SOCKET_PATH@"
#define BSPWM_STATUS_PREFIX "@SETTING_BSPWM_STATUS_PREFIX@"
2016-05-19 14:41:06 +00:00
#define CONNECTION_TEST_IP "@SETTING_CONNECTION_TEST_IP@"
#define PATH_ADAPTER "@SETTING_PATH_ADAPTER@"
2016-05-19 14:41:06 +00:00
#define PATH_BACKLIGHT_MAX "@SETTING_PATH_BACKLIGHT_MAX@"
#define PATH_BACKLIGHT_VAL "@SETTING_PATH_BACKLIGHT_VAL@"
#define PATH_BATTERY "@SETTING_PATH_BATTERY@"
2016-05-19 14:41:06 +00:00
#define PATH_CPU_INFO "@SETTING_PATH_CPU_INFO@"
#define PATH_MEMORY_INFO "@SETTING_PATH_MEMORY_INFO@"
2016-11-13 18:05:30 +00:00
#define PATH_MESSAGING_FIFO "@SETTING_PATH_MESSAGING_FIFO@"
#define PATH_TEMPERATURE_INFO "@SETTING_PATH_TEMPERATURE_INFO@"
2016-06-15 03:32:35 +00:00
2016-11-20 22:04:31 +00:00
auto version_details = [](const std::vector<std::string>& args) {
for (auto&& arg : args) {
if (arg.compare(0, 3, "-vv") == 0)
return true;
}
return false;
};
// clang-format off
auto print_build_info = [](bool extended = false) {
std::cout << APP_NAME << " " << GIT_TAG << " " << "\n"
<< "\n"
<< "Features: "
<< (ENABLE_ALSA ? "+" : "-") << "alsa "
<< (ENABLE_I3 ? "+" : "-") << "i3 "
<< (ENABLE_MPD ? "+" : "-") << "mpd "
<< (ENABLE_NETWORK ? "+" : "-") << "network "
<< "\n";
if (!extended)
return;
std::cout << "\n"
<< "Build type: @CMAKE_BUILD_TYPE@" << "\n"
<< "Compiler flags: @CMAKE_CXX_FLAGS@" << "\n"
<< "Linker flags: @CMAKE_EXE_LINKER_FLAGS@" << "\n"
<< "\n"
<< "ALSA_SOUNDCARD " << ALSA_SOUNDCARD << "\n"
<< "BSPWM_SOCKET_PATH " << BSPWM_SOCKET_PATH << "\n"
<< "BSPWM_STATUS_PREFIX " << BSPWM_STATUS_PREFIX << "\n"
<< "BUILDER_SPACE_TOKEN " << BUILDER_SPACE_TOKEN << "\n"
<< "CONNECTION_TEST_IP " << CONNECTION_TEST_IP << "\n"
<< "PATH_ADAPTER " << PATH_ADAPTER << "\n"
<< "PATH_BACKLIGHT_MAX " << PATH_BACKLIGHT_MAX << "\n"
<< "PATH_BACKLIGHT_VAL " << PATH_BACKLIGHT_VAL << "\n"
<< "PATH_BATTERY " << PATH_BATTERY << "\n"
<< "PATH_CPU_INFO " << PATH_CPU_INFO << "\n"
<< "PATH_MEMORY_INFO " << PATH_MEMORY_INFO << "\n"
<< "PATH_TEMPERATURE_INFO " << PATH_TEMPERATURE_INFO << "\n";
2016-06-15 03:32:35 +00:00
};
2016-11-20 22:04:31 +00:00
// clang-format on
2016-06-15 03:32:35 +00:00
// vim:ft=cpp