2016-11-03 12:06:33 +00:00
|
|
|
#
|
|
|
|
# Build options
|
|
|
|
#
|
|
|
|
|
2016-11-12 16:25:44 +00:00
|
|
|
# Default value for: ENABLE_ALSA {{{
|
|
|
|
|
|
|
|
find_package(ALSA QUIET)
|
|
|
|
if(NOT DEFINED ENABLE_ALSA AND NOT ALSA_FOUND)
|
|
|
|
set(ENABLE_ALSA OFF CACHE STRING "Module support for alsa-lib")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# }}}
|
|
|
|
# Default value for: ENABLE_NETWORK {{{
|
|
|
|
|
|
|
|
find_package(Libiw QUIET)
|
|
|
|
if(NOT DEFINED ENABLE_NETWORK AND NOT LIBIW_FOUND)
|
|
|
|
set(ENABLE_NETWORK OFF CACHE STRING "Module support for wireless_tools")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# }}}
|
|
|
|
# Default value for: ENABLE_MPD {{{
|
|
|
|
|
|
|
|
find_package(LibMPDClient QUIET)
|
|
|
|
if(NOT DEFINED ENABLE_MPD AND NOT LIBMPDCLIENT_FOUND)
|
|
|
|
set(ENABLE_MPD OFF CACHE STRING "Module support for libmpdclient")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# }}}
|
|
|
|
# Default value for: ENABLE_I3 {{{
|
|
|
|
|
|
|
|
find_program(I3_BINARY i3)
|
|
|
|
if(NOT DEFINED ENABLE_I3 AND NOT I3_BINARY)
|
|
|
|
set(ENABLE_I3 OFF CACHE STRING "Module support for i3wm")
|
|
|
|
endif()
|
|
|
|
|
2016-12-19 21:01:37 +00:00
|
|
|
# }}}
|
|
|
|
# Default value for: ENABLE_CURL {{{
|
|
|
|
|
|
|
|
find_package(CURL QUIET)
|
|
|
|
if(NOT DEFINED ENABLE_CURL AND NOT CURL_FOUND)
|
|
|
|
set(ENABLE_CURL OFF CACHE STRING "Module support for libcurl")
|
|
|
|
endif()
|
|
|
|
|
2016-11-12 16:25:44 +00:00
|
|
|
# }}}
|
|
|
|
|
|
|
|
# Define build options {{{
|
|
|
|
|
2016-11-03 12:06:33 +00:00
|
|
|
option(CXXLIB_CLANG "Link against libc++" OFF)
|
|
|
|
option(CXXLIB_GCC "Link against stdlibc++" OFF)
|
|
|
|
|
2017-01-10 01:09:27 +00:00
|
|
|
option(BUILD_IPC_MSG "Build ipc messager" ON)
|
2016-11-03 12:06:33 +00:00
|
|
|
option(BUILD_TESTS "Build testsuite" OFF)
|
2017-01-13 10:04:43 +00:00
|
|
|
|
2017-01-19 04:38:42 +00:00
|
|
|
if(DEBUG)
|
|
|
|
option(DEBUG_LOGGER "Debug logging" OFF)
|
|
|
|
option(DEBUG_LOGGER_VERBOSE "Debug logging (verbose)" OFF)
|
|
|
|
option(DEBUG_HINTS "Debug clickable areas" OFF)
|
|
|
|
option(DEBUG_WHITESPACE "Debug whitespace" OFF)
|
|
|
|
option(DEBUG_FONTCONFIG "Debug fontconfig" OFF)
|
2017-01-13 10:04:43 +00:00
|
|
|
endif()
|
2016-11-03 12:06:33 +00:00
|
|
|
|
|
|
|
option(ENABLE_CCACHE "Enable ccache support" OFF)
|
|
|
|
option(ENABLE_ALSA "Enable alsa support" ON)
|
2016-12-19 21:01:37 +00:00
|
|
|
option(ENABLE_CURL "Enable curl support" ON)
|
2016-11-03 12:06:33 +00:00
|
|
|
option(ENABLE_I3 "Enable i3 support" ON)
|
|
|
|
option(ENABLE_MPD "Enable mpd support" ON)
|
|
|
|
option(ENABLE_NETWORK "Enable network support" ON)
|
|
|
|
|
2017-01-24 07:49:27 +00:00
|
|
|
option(WITH_XRANDR "xcb-randr support" ON)
|
|
|
|
option(WITH_XRENDER "xcb-render support" OFF)
|
|
|
|
option(WITH_XDAMAGE "xcb-damage support" OFF)
|
|
|
|
option(WITH_XSYNC "xcb-sync support" OFF)
|
|
|
|
option(WITH_XCOMPOSITE "xcb-composite support" OFF)
|
|
|
|
option(WITH_XKB "xcb-xkb support" ON)
|
2017-01-20 01:25:54 +00:00
|
|
|
option(WITH_XRM "xcb-xrm support" ON)
|
|
|
|
|
|
|
|
if(NOT DEFINED WITH_XRM)
|
|
|
|
pkg_check_modules(XRM QUIET xcb-xrm)
|
|
|
|
set(WITH_XRM ${XRM_FOUND} CACHE BOOL "Enable xcb-xrm support")
|
|
|
|
endif()
|
2016-11-03 12:06:33 +00:00
|
|
|
|
2017-01-13 02:52:56 +00:00
|
|
|
if(NOT DEFINED ENABLE_XRANDR_MONITORS)
|
2017-01-25 19:16:02 +00:00
|
|
|
pkg_check_modules(XRANDR QUIET xrandr>=1.5.0 randrproto>=1.5.0 xcb-proto>=1.12)
|
2017-01-13 03:13:44 +00:00
|
|
|
if(NOT XRANDR_FOUND)
|
|
|
|
set(XRANDR_FOUND OFF)
|
|
|
|
endif()
|
|
|
|
set(ENABLE_XRANDR_MONITORS ${XRANDR_FOUND} CACHE BOOL "Enable XRandR monitor feature (requires version 1.5+)")
|
2017-01-13 02:52:56 +00:00
|
|
|
endif()
|
|
|
|
|
2016-11-12 16:25:44 +00:00
|
|
|
# }}}
|
|
|
|
# Set cache vars {{{
|
|
|
|
|
2016-11-03 12:06:33 +00:00
|
|
|
set(SETTING_ALSA_SOUNDCARD "default"
|
|
|
|
CACHE STRING "Name of the ALSA soundcard driver")
|
2016-11-19 14:42:31 +00:00
|
|
|
set(SETTING_BSPWM_SOCKET_PATH "/tmp/bspwm_0_0-socket"
|
|
|
|
CACHE STRING "Path to bspwm socket")
|
|
|
|
set(SETTING_BSPWM_STATUS_PREFIX "W"
|
|
|
|
CACHE STRING "Prefix prepended to the bspwm status line")
|
2016-11-03 12:06:33 +00:00
|
|
|
set(SETTING_CONNECTION_TEST_IP "8.8.8.8"
|
|
|
|
CACHE STRING "Address to ping when testing network connection")
|
2016-11-21 07:22:12 +00:00
|
|
|
set(SETTING_PATH_ADAPTER "/sys/class/power_supply/%adapter%"
|
|
|
|
CACHE STRING "Path to adapter")
|
2016-11-03 12:06:33 +00:00
|
|
|
set(SETTING_PATH_BACKLIGHT_MAX "/sys/class/backlight/%card%/max_brightness"
|
|
|
|
CACHE STRING "Path to file containing the maximum backlight value")
|
2016-11-19 14:42:31 +00:00
|
|
|
set(SETTING_PATH_BACKLIGHT_VAL "/sys/class/backlight/%card%/brightness"
|
|
|
|
CACHE STRING "Path to file containing the current backlight value")
|
2016-11-21 07:22:12 +00:00
|
|
|
set(SETTING_PATH_BATTERY "/sys/class/power_supply/%battery%"
|
|
|
|
CACHE STRING "Path to battery")
|
2016-11-03 12:06:33 +00:00
|
|
|
set(SETTING_PATH_CPU_INFO "/proc/stat"
|
|
|
|
CACHE STRING "Path to file containing cpu info")
|
|
|
|
set(SETTING_PATH_MEMORY_INFO "/proc/meminfo"
|
|
|
|
CACHE STRING "Path to file containing memory info")
|
2016-11-19 05:22:44 +00:00
|
|
|
set(SETTING_PATH_MESSAGING_FIFO "/tmp/polybar_mqueue.%pid%"
|
2016-11-13 18:05:30 +00:00
|
|
|
CACHE STRING "Path to file containing the current temperature")
|
2016-11-19 14:42:31 +00:00
|
|
|
set(SETTING_PATH_TEMPERATURE_INFO "/sys/class/thermal/thermal_zone%zone%/temp"
|
|
|
|
CACHE STRING "Path to file containing the current temperature")
|
2016-11-03 12:06:33 +00:00
|
|
|
|
2016-11-25 03:10:26 +00:00
|
|
|
set(DEBUG_HINTS_OFFSET_X 0 CACHE INTEGER "Debug hint offset x")
|
|
|
|
set(DEBUG_HINTS_OFFSET_Y 0 CACHE INTEGER "Debug hint offset y")
|
|
|
|
|
2016-11-12 16:25:44 +00:00
|
|
|
# }}}
|