can successfully compile openmvg into project.
This commit is contained in:
26
scripts/compilelib.sh
Executable file
26
scripts/compilelib.sh
Executable 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
13
scripts/dartffi.sh
Executable 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
14
scripts/watch_compilelib.sh
Executable 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
14
scripts/watch_dartffi.sh
Executable 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
|
Reference in New Issue
Block a user