can successfully compile openmvg into project.

This commit is contained in:
Jordan
2024-03-11 07:36:09 -07:00
parent e3f9413566
commit b3cd0316b7
20 changed files with 5049 additions and 158 deletions

26
scripts/compilelib.sh Executable file
View File

@ -0,0 +1,26 @@
#!/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
make
set +e

13
scripts/dartffi.sh Executable file
View File

@ -0,0 +1,13 @@
#!/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)
ROOT_DIR=$(realpath ${DIR}/..)
cd -P ${ROOT_DIR} && dart run ffigen --config ffigen.yaml

14
scripts/watch_compilelib.sh Executable file
View File

@ -0,0 +1,14 @@
#!/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)
SRC_DIR=$(realpath ${DIR}/../src)
find ${SRC_DIR} -name "*.c" -o -name "*.h" -o -name "CMakeLists.txt" | \
entr -r ${DIR}/compilelib.sh

14
scripts/watch_dartffi.sh Executable file
View File

@ -0,0 +1,14 @@
#!/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)
SRC_DIR=$(realpath ${DIR}/../src)
find ${SRC_DIR} -name "*.c" -o -name "*.h" -o -name "CMakeLists.txt" | \
entr -r ${DIR}/dartffi.sh