@@ -4,28 +4,51 @@ plugins {
4
4
5
5
import org.gradle.internal.os.OperatingSystem
6
6
println ' Operating system: ' + OperatingSystem . current()
7
+ def arch = System . getProperty(" os.arch" )
8
+ def ov_arch = arch;
9
+ println ' CPU architecture: ' + arch
10
+
7
11
8
12
def nativesCPP;
9
- def openvinoVersion = " 2022.1"
13
+ def openvinoVersion = " 2023.0"
14
+
15
+ def native_resources = []
16
+ def tbb_dir = System . getenv(' TBB_DIR' )
17
+ if (tbb_dir) {
18
+ if (new File (tbb_dir + " /../lib/" ). exists()) {
19
+ native_resources. add(tbb_dir + " /../lib/" );
20
+ } else {
21
+ native_resources. add(tbb_dir + " /../../" );
22
+ }
23
+ }
24
+
25
+ if (arch == " x86_64" || arch == " amd64" || arch == " x64" || arch == " x86-64" ) {
26
+ arch = " x86_64" ;
27
+ ov_arch = " intel64" ;
28
+ } else if (arch == " aarch64" || arch == " arm64" || arch == " arm-v8" ) {
29
+ arch = " arm64" ;
30
+ ov_arch = " aarch64" ;
31
+ } else if (arch == " arm" || arch == " arm-v7" || arch == " armv7" || arch == " arm32" ) {
32
+ arch = " arm32" ;
33
+ ov_arch = " armhf" ;
34
+ }
10
35
11
36
if (OperatingSystem . current(). isMacOsX()) {
12
- nativesCPP = ' macosx-x86_64'
37
+ nativesCPP = ' macosx-'
38
+ native_resources. add(System . getenv(' INTEL_OPENVINO_DIR' ) + " /runtime/lib/" + ov_arch + " /Release" );
13
39
} else if (OperatingSystem . current(). isLinux()) {
14
- nativesCPP = ' linux-x86_64'
40
+ nativesCPP = ' linux-'
41
+ native_resources. add(System . getenv(' INTEL_OPENVINO_DIR' ) + " /runtime/lib/" + ov_arch);
15
42
} else if (OperatingSystem . current(). isWindows()) {
16
- nativesCPP = ' windows-x86_64'
43
+ nativesCPP = ' windows-'
44
+ native_resources. add(System . getenv(' INTEL_OPENVINO_DIR' ) + " /runtime/bin/" + ov_arch + " /Release" );
17
45
} else {
18
46
logger. warn(' Unknown operating system!' )
19
47
}
48
+ nativesCPP + = arch;
20
49
21
50
project. version = " ${ openvinoVersion} -${ nativesCPP} "
22
51
23
- def native_resources = [
24
- System . getenv(' INTEL_OPENVINO_DIR' ) + " /runtime/lib/intel64" , // UNIX
25
- System . getenv(' INTEL_OPENVINO_DIR' ) + " /runtime/lib/intel64/Release" , // Mac
26
- System . getenv(' INTEL_OPENVINO_DIR' ) + " /runtime/bin/intel64/Release" , // Windows
27
- System . getenv(' TBB_DIR' ) + " /../lib/" ,
28
- ]
29
52
def resources_list = " "
30
53
native_resources. each {
31
54
def tree = fileTree(it) {
0 commit comments