libdart_openmvg/scripts/compilelib.sh
2024-03-20 09:42:18 -07:00

28 lines
617 B
Bash
Executable File

#!/bin/bash
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do
DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE
done
DIR=$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)
BUILD_DIR=$(realpath $DIR/../build)
SRC_DIR=$(realpath $DIR/../src)
CMAKE_INSTALL_PREFIX=$(realpath $DIR/../../openMVG/build/_install)
ls $BUILD_DIR
set -e
printf "\033c"
cd ${BUILD_DIR}
cmake \
${SRC_DIR}\
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}\
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Debug
make
set +e