Przemek Grondek
dd03bb3c40
Search for xcbgen with PYTHON_EXECUTABLE This way users can specify `-D:PYTHON_EXECUTABLE` to force a certain python executable and that executable will then also be used to search for xcbgen. This should also provide a more universal solution to the configuration issues with pyenv or conda since the user can just specify `-D:PYTHON_EXECUTABLE=/usr/bin/python3`.
48 lines
1.1 KiB
Bash
Executable File
48 lines
1.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
|
|
ENABLE_DWM=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}" \
|
|
-DENABLE_DWM="${ENABLE_DWM:-OFF}" \
|
|
-DWITH_XRM="${WITH_XRM:-OFF}" \
|
|
-DWITH_XKB="${WITH_XKB:-OFF}" \
|
|
-DWITH_XRANDR_MONITORS="${WITH_XRANDR_MONITORS:-OFF}" \
|
|
-DWITH_XCURSOR="${WITH_XCURSOR:-OFF}" \
|
|
..
|