mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-23 00:56:21 +03:00
b8fa610f8f
* OSX: Fix lack of newlines in build messages * OSX: Build full installer as part of the installer build via cmake
39 lines
1.2 KiB
Bash
39 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
if [ ! $BARRIER_BUILD_ENV ]; then
|
|
|
|
printf "Modifying environment for Barrier build...\n"
|
|
|
|
if command -v port; then
|
|
printf "Detected Macports\n"
|
|
|
|
if [ ! -d /opt/local/lib/cmake/Qt5 ]; then
|
|
printf "Please install qt5-qtbase port\n"
|
|
fi
|
|
export BARRIER_BUILD_MACPORTS=1
|
|
export CMAKE_PREFIX_PATH="/opt/local/lib/cmake/Qt5:$CMAKE_PREFIX_PATH"
|
|
export LD_LIBRARY_PATH="/opt/local/lib:$LD_LIBRARY_PATH"
|
|
export CPATH="/opt/local/include:$CPATH"
|
|
export PKG_CONFIG_PATH="/opt/local/libexec/qt5/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
elif command -v brew; then
|
|
printf "Detected Homebrew\n"
|
|
QT_PATH=$(brew --prefix qt)
|
|
OPENSSL_PATH=$(brew --prefix openssl)
|
|
|
|
export BARRIER_BUILD_BREW=1
|
|
export CMAKE_PREFIX_PATH="$QT_PATH:$CMAKE_PREFIX_PATH"
|
|
export LD_LIBRARY_PATH="$OPENSSL_PATH/lib:$LD_LIBRARY_PATH"
|
|
export CPATH="$OPENSSL_PATH/include:$CPATH"
|
|
export PKG_CONFIG_PATH="$OPENSSL_PATH/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
else
|
|
printf "Neither Homebrew nor Macports is installed. Can't get dependency paths\n"
|
|
exit 1
|
|
fi
|
|
|
|
export BARRIER_BUILD_ENV=1
|
|
|
|
printf "done\n"
|
|
fi
|