forked from bytedeco/javacpp-presets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcppbuild.sh
More file actions
executable file
·78 lines (67 loc) · 2.19 KB
/
cppbuild.sh
File metadata and controls
executable file
·78 lines (67 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# This file is meant to be included by the parent cppbuild.sh script
if [[ -z "$PLATFORM" ]]; then
pushd ..
bash cppbuild.sh "$@" openvino
popd
exit
fi
OPENVINO_VERSION=2025.4.1
OPENVINO_BUILD=20426.82bbf0292c5
OPENVINO_PACKAGES_URL=https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION}
mkdir -p "$PLATFORM"
cd "$PLATFORM"
INSTALL_PATH=`pwd`
mkdir -p include lib bin
extract_openvino_archive() {
local archive_platform=$1
local archive_name=$2
local archive_dir
find . -maxdepth 1 -type d -name "openvino_toolkit_*" -exec rm -rf {} \;
download "${OPENVINO_PACKAGES_URL}/${archive_platform}/${archive_name}" "${archive_name}"
case "$archive_name" in
*.zip)
unzip -q -o "$archive_name"
;;
*.tar.gz|*.tgz)
tar -xzf "$archive_name"
;;
*)
echo "Error: Unsupported archive \"$archive_name\""
exit 1
;;
esac
archive_dir=$(find . -maxdepth 1 -type d -name "openvino_toolkit_*_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64" | head -n 1)
if [[ -z "$archive_dir" ]]; then
echo "Error: OpenVINO archive contents not found in \"$archive_name\""
exit 1
fi
cp -a "$archive_dir/runtime/include/." include/
case $PLATFORM in
linux-x86_64)
cp -a "$archive_dir/runtime/lib/intel64/." lib/
;;
windows-x86_64)
cp -a "$archive_dir/runtime/bin/intel64/Release/." bin/
cp -a "$archive_dir/runtime/lib/intel64/Release/." lib/
;;
esac
rm -rf "$archive_dir"
}
case $PLATFORM in
linux-x86_64)
extract_openvino_archive linux openvino_toolkit_ubuntu22_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64.tgz
pushd lib
ln -sf $(ls libopenvino.so.* | head -n 1) libopenvino.so
ln -sf $(ls libopenvino_c.so.* | head -n 1) libopenvino_c.so
popd
;;
windows-x86_64)
extract_openvino_archive windows openvino_toolkit_windows_${OPENVINO_VERSION}.${OPENVINO_BUILD}_x86_64.zip
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
exit 1
;;
esac
cd ..