From 61898a6509d90c1fd79ee3a7bd4bfb0fe4bd801a Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Fri, 5 Nov 2021 16:12:19 +0000 Subject: [PATCH] Renamed Mac env script as per @p12tic's feedback Signed-off-by: Dom Rodriguez --- macOS_environment.sh => macos_environment.sh | 0 osx_environment.sh | 49 -------------------- 2 files changed, 49 deletions(-) rename macOS_environment.sh => macos_environment.sh (100%) delete mode 100644 osx_environment.sh diff --git a/macOS_environment.sh b/macos_environment.sh similarity index 100% rename from macOS_environment.sh rename to macos_environment.sh diff --git a/osx_environment.sh b/osx_environment.sh deleted file mode 100644 index 2ee886da..00000000 --- a/osx_environment.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -# Checks if directory exists, otherwise asks to install package. -check_dir_exists() { - local path=$1 - local package=$2 - - if [ ! -d "$path" ]; then - echo "Please install $package" - exit 1 - fi -} - -if [ -z "$BARRIER_BUILD_ENV" ]; then - check_dir_exists '/Applications/Xcode.app' 'Xcode' - - printf "Modifying environment for Barrier build...\n" - - if command -v port; then - printf "Detected Macports\n" - - check_dir_exists '/opt/local/lib/cmake/Qt5' 'qt5-qtbase port' - - 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@5) - - check_dir_exists "$QT_PATH" 'qt5' - - export BARRIER_BUILD_BREW=1 - export CMAKE_PREFIX_PATH="/opt/procursus:$QT_PATH:$CMAKE_PREFIX_PATH" - export LD_LIBRARY_PATH="/opt/procursus/lib:$LD_LIBRARY_PATH" - export CPATH="/opt/procursus/include:$CPATH" - export PKG_CONFIG_PATH="/opt/procursus/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