Skip to content

Commit

Permalink
switches casadi submodule for debian
Browse files Browse the repository at this point in the history
  • Loading branch information
xwilson03 committed May 23, 2024
1 parent aab9349 commit 0cfaa0a
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions scripts/setup_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ fi
cd $VEXU_HOME
git submodule update --recursive

# Get processor architecture to determine proper .deb source
$arch=$(uname -p)

# Build matplotlib-cpp
echo "--------------- MATPLOTLIB_CPP ---------------"
if [ ! -d "${VEXU_HOME}/09_External/matplotlib-cpp/build" ];
Expand Down Expand Up @@ -60,20 +63,34 @@ echo

# Build Casadi
echo "--------------- CASADI ---------------"
if [ ! -d "${VEXU_HOME}/09_External/casadi/build" ];
then
cd $VEXU_HOME/09_External/casadi
mkdir build && cd build
# if [ ! -d "${VEXU_HOME}/09_External/casadi/build" ];
# then
# cd $VEXU_HOME/09_External/casadi
# mkdir build && cd build

cmake -DWITH_PYTHON=ON -DWITH_IPOPT=ON -DWITH_OPENMP=ON -DWITH_THREAD=ON .. || exit -1
make || exit -1
sudo make install || exit -1
# cmake -DWITH_PYTHON=ON -DWITH_IPOPT=ON -DWITH_OPENMP=ON -DWITH_THREAD=ON .. || exit -1
# make || exit -1
# sudo make install || exit -1

# cd ../..
# else
# echo "Build already exists"
# fi

if [ "$arch" == 'x86_64' ]; then
sudo wget https://github.com/VEXU-GHOST/ghost_dependencies/raw/22db13647a74e7911c249b5762ea3c6d12893aa4/deb/ghost-casadi-86.deb
sudo dpkg -i ~/Downloads/ghost-casadi-86.deb

elif [ "$arch" == 'aarch64' ]; then
echo "TODO(xander): add arm debian link here"
echo "TODO(xander): add arm debian installation here"

cd ../..
else
echo "Build already exists"
echo "Failure: Unexpected processure architecture."
exit -1
fi


echo
echo

Expand Down

0 comments on commit 0cfaa0a

Please sign in to comment.