2020-12-11 15:37:54 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
|
|
|
if [ -d "$BUILD_DIR" ]; then
|
|
|
|
rm -Rf "$BUILD_DIR"
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "${BUILD_DIR}"
|
|
|
|
cd "${BUILD_DIR}"
|
|
|
|
|
|
|
|
if [ "$POLYBAR_BUILD_TYPE" != "minimal" ]; then
|
|
|
|
ENABLE_PULSEAUDIO=ON
|
|
|
|
ENABLE_NETWORK=ON
|
|
|
|
ENABLE_MPD=ON
|
|
|
|
ENABLE_CURL=ON
|
|
|
|
ENABLE_ALSA=ON
|
|
|
|
ENABLE_I3=ON
|
|
|
|
WITH_XRM=ON
|
|
|
|
WITH_XKB=ON
|
|
|
|
WITH_XRANDR_MONITORS=ON
|
|
|
|
WITH_XCURSOR=ON
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$POLYBAR_BUILD_TYPE" = "tests" ]; then
|
|
|
|
BUILD_TESTS=ON
|
|
|
|
fi
|
|
|
|
|
|
|
|
cmake \
|
|
|
|
-DCMAKE_CXX_COMPILER="${CXX}" \
|
2021-07-11 08:11:58 -04:00
|
|
|
-DPOLYBAR_FLAGS="${CXXFLAGS} -Werror" \
|
2020-12-11 15:37:54 -05:00
|
|
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
|
|
|
-DBUILD_TESTS:BOOL="${BUILD_TESTS:-OFF}" \
|
2020-12-21 21:43:06 -05:00
|
|
|
-DBUILD_DOC:BOOL=OFF \
|
2020-12-11 15:37:54 -05:00
|
|
|
-DENABLE_PULSEAUDIO="${ENABLE_PULSEAUDIO:-OFF}" \
|
|
|
|
-DENABLE_NETWORK="${ENABLE_NETWORK:-OFF}" \
|
|
|
|
-DENABLE_MPD="${ENABLE_MPD:-OFF}" \
|
|
|
|
-DENABLE_CURL="${ENABLE_CURL:-OFF}" \
|
|
|
|
-DENABLE_ALSA="${ENABLE_ALSA:-OFF}" \
|
|
|
|
-DENABLE_I3="${ENABLE_I3:-OFF}" \
|
|
|
|
-DWITH_XRM="${WITH_XRM:-OFF}" \
|
|
|
|
-DWITH_XKB="${WITH_XKB:-OFF}" \
|
|
|
|
-DWITH_XRANDR_MONITORS="${WITH_XRANDR_MONITORS:-OFF}" \
|
|
|
|
-DWITH_XCURSOR="${WITH_XCURSOR:-OFF}" \
|
|
|
|
..
|