obs-websocket/CI/build-macos.sh
PatTheMav 84c0b698f5
Updated build files for macOS build
* Checks for OS type before executing
* Checks for Homebrew
* Checks for git (obs-studio build phase)
* Checks for cmake (obs-studio build phase)
* Installs/Updates depdencies
* Installs QT 5.10.1 from bottle (just like obs-studio)
* Pins QT so homebrew does not forcefully update it
* Removed wget dependency, uses macOS' curl
* More output
2018-10-24 14:55:17 +02:00

27 lines
847 B
Bash
Executable File

#!/bin/sh
if [[ "${OSTYPE}" != "darwin"* ]]; then
echo "[obs-websocket - Error] macOS build script can be run on Darwin-type OS only."
return 1
fi
HAS_CMAKE=$(type cmake 2>/dev/null)
HAS_GIT=$(type git 2>/dev/null)
if [[ "${HAS_CMAKE}" == "" ]]; then
echo "[obs-websocket - Error] CMake not installed - please run 'install-dependencies-macos.sh' first."
return 1
fi
#export QT_PREFIX="$(find /usr/local/Cellar/qt5 -d 1 | tail -n 1)"
echo "[obs-websocket] Building 'obs-websocket' for macOS."
mkdir -p build && cd build
cmake .. \
-DQTDIR=/usr/local/opt/qt \
-DLIBOBS_INCLUDE_DIR=../../obs-studio/libobs \
-DLIBOBS_LIB=../../obs-studio/libobs \
-DOBS_FRONTEND_LIB="$(pwd)/../../obs-studio/build/UI/obs-frontend-api/libobs-frontend-api.dylib" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
&& make -j4