1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00
polybar/common/ci/configure.sh
patrick96 3652d5fe0d cmake: Stop using CMAKE_* variables for flags
It is not recommended anyway and the -Werror flag set in CI was getting
set when compiling gtest, breaking our build.
2021-07-11 14:47:26 +02:00

45 lines
1 KiB
Bash
Executable file

#!/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}" \
-DPOLYBAR_FLAGS="${CXXFLAGS} -Werror" \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
-DBUILD_TESTS:BOOL="${BUILD_TESTS:-OFF}" \
-DBUILD_DOC:BOOL=OFF \
-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}" \
..