Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36ec913
commit cd4045c
Showing
10 changed files
with
193 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/config.sh |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
|
||
. "$script_dir/config.sh" | ||
|
||
export PKG_CONFIG_PATH="$OPENCV_32_PKG_CONFIG_PATH" | ||
export OPENCV_PACKAGE_NAME="$OPENCV_32_OPENCV_PACKAGE_NAME" | ||
export LD_LIBRARY_PATH="$OPENCV_32_LD_LIBRARY_PATH" | ||
export OPENCV_INCLUDE_PATHS="$OPENCV_32_OPENCV_INCLUDE_PATHS" |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
|
||
. "$script_dir/config.sh" | ||
|
||
export OpenCV_DIR="$OPENCV_34_CMAKE_DIR" | ||
export LD_LIBRARY_PATH="$OPENCV_34_LD_LIBRARY_PATH" |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
|
||
. "$script_dir/config.sh" | ||
|
||
export OpenCV_DIR="$OPENCV_4_CMAKE_DIR" | ||
export LD_LIBRARY_PATH="$OPENCV_4_LD_LIBRARY_PATH" | ||
export OPENCV_INCLUDE_PATHS="$OPENCV_4_OPENCV_INCLUDE_PATHS" |
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!/bin/bash | ||
|
||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
|
||
. "$script_dir/config.sh" | ||
|
||
export RUSTFLAGS=-Clink-arg=-fuse-ld=lld | ||
export RUST_BACKTRACE=full | ||
SRC_CPP_DIR="$script_dir/../src_cpp/" | ||
OUT_DIR="$script_dir/../out/generator/" | ||
|
||
cd "$script_dir/.." | ||
|
||
if ! cargo build --release -p opencv-binding-generator --bin binding-generator; then | ||
exit | ||
fi | ||
|
||
all_modules="alphamat | ||
aruco | ||
bgsegm | ||
bioinspired | ||
calib3d | ||
ccalib | ||
core | ||
cudaarithm | ||
cudabgsegm | ||
cudacodec | ||
cudafeatures2d | ||
cudafilters | ||
cudaimgproc | ||
cudaobjdetect | ||
cudaoptflow | ||
cudastereo | ||
cudawarping | ||
cvv | ||
dnn | ||
dnn_superres | ||
dpm | ||
face | ||
features2d | ||
flann | ||
freetype | ||
fuzzy | ||
gapi | ||
hdf | ||
hfs | ||
highgui | ||
img_hash | ||
imgcodecs | ||
imgproc | ||
intensity_transform | ||
line_descriptor | ||
mcc | ||
ml | ||
objdetect | ||
optflow | ||
ovis | ||
phase_unwrapping | ||
photo | ||
plot | ||
quality | ||
rapid | ||
rgbd | ||
saliency | ||
sfm | ||
shape | ||
stereo | ||
stitching | ||
structured_light | ||
superres | ||
surface_matching | ||
text | ||
tracking | ||
video | ||
videoio | ||
videostab | ||
viz | ||
xfeatures2d | ||
ximgproc | ||
xobjdetect | ||
xphoto | ||
wechat_qrcode | ||
" | ||
modules="${*:-$all_modules}" | ||
|
||
for module in $modules; do | ||
rm -f "$OUT_DIR/$module.rs" "$OUT_DIR/$module.externs.rs" "$OUT_DIR/$module.cpp" "$OUT_DIR/ocvrs_ephemeral_$module.hpp" | ||
rm -f "$OUT_DIR"/???-"$module"-*.type.cpp "$OUT_DIR"/???-"$module"-*.type.rs | ||
done | ||
|
||
export OPENCV_BINDING_GENERATOR_EMIT_DEBUG=1 | ||
parallel --eta "$script_dir/../target/release/binding-generator" --debug "$OPENCV_4_HEADER_DIR" "$SRC_CPP_DIR" "$OUT_DIR" "{}" ::: $modules |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
|
||
. "$script_dir/config.sh" | ||
|
||
cd "$script_dir/.." | ||
|
||
rsync -av --progress --exclude "/target" --exclude "/.idea" ./ "$MACOS_ADDR:opencv-rust/" |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
|
||
cd "$script_dir" | ||
|
||
./regen.sh 32 | ||
./regen.sh 34 | ||
./regen.sh 4 | ||
|
||
rm -rf target/release/build/opencv-* |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
branch="$1" | ||
|
||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
|
||
cd "$script_dir/.." | ||
|
||
. "$script_dir/env-$branch.sh" | ||
|
||
export RUSTFLAGS="-Clink-arg=-fuse-ld=lld" | ||
|
||
touch build.rs | ||
cargo -vv test --release |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
cd "$script_dir/.." | ||
|
||
export RUSTFLAGS="-Clink-arg=-fuse-ld=lld" | ||
export OS_FAMILY="linux" | ||
|
||
( | ||
. "$script_dir/env-32.sh" | ||
ci/script.sh | ||
) | ||
|
||
( | ||
. "$script_dir/env-34.sh" | ||
ci/script.sh | ||
) | ||
|
||
( | ||
. "$script_dir/env-4.sh" | ||
ci/script.sh | ||
) | ||
|
||
cargo clean |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
script_dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" | ||
|
||
. "$script_dir/config.sh" | ||
|
||
cd "$script_dir/.." | ||
|
||
rsync -av --progress --exclude "/target" --exclude "/.idea" ./ "$WIN_ADDR:opencv-rust/" |