1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00
polybar/common/travis/configure.sh
patrick96 747cdfe7f5 refactor(travis): Add minimal build configuration
Uses none of the optional dependencies. This ensures that polybar can
build without any of the supposedly optional dependencies. This would
have detected the cause of the xrm build failure before it was merged
2018-06-18 11:49:31 +02:00

32 lines
803 B
Bash
Executable file

#!/bin/bash
mkdir -p "${TRAVIS_BUILD_DIR}/build"
cd "${TRAVIS_BUILD_DIR}/build" || false
FLAGS=""
# Disable all extra modules and X extensions for minimal builds
# Most of these should already be turned off because their libraries are not
# installed, but some may not be
if [ "$POLYBAR_BUILD_TYPE" == "minimal" ]; then
FLAGS=(
"-DENABLE_PULSEAUDIO=OFF"
"-DENABLE_NETWORK=OFF"
"-DENABLE_MPD=OFF"
"-DENABLE_CURL=OFF"
"-DENABLE_ALSA=OFF"
"-DENABLE_I3=OFF"
"-DWITH_XRM=OFF"
"-DWITH_XKB=OFF"
"-DWITH_XRANDR_MONITORS=OFF"
"-DWITH_XCURSOR=OFF"
"-DWITH_XRANDR=ON"
)
fi
cmake \
-DCMAKE_C_COMPILER="${CC}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
-DBUILD_TESTS:BOOL="${BUILD_TESTS:-OFF}" \
"${FLAGS[@]}" ..