mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-23 00:56:21 +03:00
build checks unixbuild_env.sh for environmental overrides
This commit is contained in:
parent
916b085474
commit
1648c1d51a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
winbuild_env.bat
|
winbuild_env.bat
|
||||||
|
unixbuild_env.sh
|
||||||
config.h
|
config.h
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.pyc
|
*.pyc
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "$(dirname $0)" || exit 1
|
cd "$(dirname $0)" || exit 1
|
||||||
rm -rf build
|
|
||||||
mkdir build || exit 1
|
|
||||||
cd build || exit 1
|
|
||||||
# some environments have cmake v2 as 'cmake' and v3 as 'cmake3'
|
# some environments have cmake v2 as 'cmake' and v3 as 'cmake3'
|
||||||
# check for cmake3 first then fallback to just cmake
|
# check for cmake3 first then fallback to just cmake
|
||||||
B_CMAKE=`type cmake3 2>/dev/null`
|
B_CMAKE=`type cmake3 2>/dev/null`
|
||||||
@ -16,10 +13,15 @@ B_BUILD_TYPE=${B_BUILD_TYPE:-Debug}
|
|||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
# OSX needs a lot of extra help, poor thing
|
# OSX needs a lot of extra help, poor thing
|
||||||
# run the osx_environment.sh script to fix paths
|
# run the osx_environment.sh script to fix paths
|
||||||
[ -r ../osx_environment.sh ] && source ../osx_environment.sh
|
source ./osx_environment.sh
|
||||||
B_CMAKE_FLAGS="-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $B_CMAKE_FLAGS"
|
B_CMAKE_FLAGS="-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $B_CMAKE_FLAGS"
|
||||||
fi
|
fi
|
||||||
B_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$B_BUILD_TYPE $B_CMAKE_FLAGS"
|
B_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$B_BUILD_TYPE $B_CMAKE_FLAGS"
|
||||||
|
# allow local customizations to build environment
|
||||||
|
[ -r ./unixbuild_env.sh ] && source ./unixbuild_env.sh
|
||||||
|
rm -rf build
|
||||||
|
mkdir build || exit 1
|
||||||
|
cd build || exit 1
|
||||||
echo Starting Barrier $B_BUILD_TYPE build...
|
echo Starting Barrier $B_BUILD_TYPE build...
|
||||||
$B_CMAKE $B_CMAKE_FLAGS .. || exit 1
|
$B_CMAKE $B_CMAKE_FLAGS .. || exit 1
|
||||||
make || exit 1
|
make || exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user