-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CMake detection, non-standard string comparision, remove whitespace, spurious semicolons Add debug info
- Loading branch information
Showing
1 changed file
with
24 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,47 @@ | ||
#! /bin/bash | ||
|
||
set -x | ||
|
||
# check for rpclib | ||
if [ ! -f ../external/rpclib/rpclib-2.2.1/rpclib.pc.in ]; then | ||
>&2 echo "error, rpc.pc.in not found" | ||
>&2 echo "error, rpc.pc.in not found, please run setup.sh first and then run build.sh again" | ||
fi | ||
|
||
cp ../external/rpclib/rpclib-2.2.1/rpclib.pc.in AirLibWrapper/AirsimWrapper/rpclib.pc.in | ||
|
||
if [ ! -d "linux-build" ]; then | ||
mkdir linux-build; | ||
mkdir linux-build | ||
fi | ||
|
||
|
||
cd linux-build; | ||
cd linux-build | ||
export CC="clang-5.0" | ||
export CXX="clang++-5.0" | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
CMAKE="$(greadlink -f ../../cmake_build/bin/cmake)" | ||
# check for local cmake build created by setup.sh | ||
if [ -d "../../cmake_build" ]; then | ||
if [ "$(uname)" = "Darwin" ]; then | ||
CMAKE="$(greadlink -f ../../cmake_build/bin/cmake)" | ||
else | ||
CMAKE="$(readlink -f ../../cmake_build/bin/cmake)" | ||
fi | ||
else | ||
CMAKE="$(readlink -f ../../cmake_build/bin/cmake)" | ||
CMAKE=$(which cmake) | ||
fi | ||
|
||
"$CMAKE" ../../cmake ../AirLibWrapper/AirsimWrapper; | ||
make -j`nproc`; | ||
"$CMAKE" ../../cmake ../AirLibWrapper/AirsimWrapper | ||
make -j`nproc` | ||
if [ ! -d "../UnityDemo/Assets/Plugins" ]; then | ||
mkdir ../ UnityDemo/Assets/Plugins; | ||
mkdir ../UnityDemo/Assets/Plugins | ||
fi | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
cp AirsimWrapper.bundle ../UnityDemo/Assets/Plugins; | ||
if [ "$(uname)" = "Darwin" ]; then | ||
cp AirsimWrapper.bundle ../UnityDemo/Assets/Plugins | ||
else | ||
cp libAirsimWrapper.so ../UnityDemo/Assets/Plugins; | ||
cp libAirsimWrapper.so ../UnityDemo/Assets/Plugins | ||
fi | ||
|
||
cd .. | ||
if [ -f AirLibWrapper/AirsimWrapper/rpclib.pc.in ]; then | ||
rm AirLibWrapper/AirsimWrapper/rpclib.pc.in | ||
rm AirLibWrapper/AirsimWrapper/rpclib.pc.in | ||
fi |