diff --git a/hailort/cppbuild.sh b/hailort/cppbuild.sh
index d201c60585..14e96587cb 100644
--- a/hailort/cppbuild.sh
+++ b/hailort/cppbuild.sh
@@ -14,19 +14,9 @@ cd $PLATFORM
tar -xzvf ../hailort-v$HAILORT_VERSION.tar.gz
cd hailort-$HAILORT_VERSION
+sedinplace 's/EMPTY_STRUCT_PLACEHOLDER/uint8_t reserved;/g' hailort/libhailort/include/hailo/hailort.h
+
case $PLATFORM in
- android-arm64)
- cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
- cmake --build build --config release --target libhailort
- mkdir -p ../include ../lib
- cp ./build/hailort/libhailort/src/libhailort.so.$HAILORT_VERSION ../lib/
- cp hailort/libhailort/include/hailo/*.h ../include/
- ;;
- android-x86_64)
- cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
- cmake --build build --config release --target libhailort
- mkdir -p ../include ../lib
- ;;
linux-x86_64)
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build --config release --target libhailort
diff --git a/hailort/pom.xml b/hailort/pom.xml
index 2d3b9f3ea3..b9eff56a56 100644
--- a/hailort/pom.xml
+++ b/hailort/pom.xml
@@ -19,6 +19,11 @@
org.bytedeco
javacpp
+
+ org.bytedeco
+ systems
+ ${project.parent.version}
+
diff --git a/hailort/src/main/java/org/bytedeco/hailort/presets/hailort.java b/hailort/src/main/java/org/bytedeco/hailort/presets/hailort.java
index 0a97401b67..9562999d92 100644
--- a/hailort/src/main/java/org/bytedeco/hailort/presets/hailort.java
+++ b/hailort/src/main/java/org/bytedeco/hailort/presets/hailort.java
@@ -11,20 +11,20 @@
"platform.h"
}),
@Platform(value = "windows", include = ""),
-/* @Platform(value = "linux",
+ @Platform(value = "linux",
include = {
// "",
// "",
// "",
- "",
+// "",
// ""
},
includepath = {
"hailort/src/test/resources/", // todo remove
- "/usr/include/x86_64-linux-gnu/",
- "/usr/include/"
+// "/usr/include/x86_64-linux-gnu/",
+// "/usr/include/"
}
- ),*/
+ ),
},
target = "org.bytedeco.hailort",
@@ -45,6 +45,13 @@ public void map(InfoMap infoMap) {
// "/\\* Type to represent a port. \\*/", "/\\* Standard well-known ports. \\*/"
// ));
+
+ // types from platform.h
+ infoMap.put(new Info("socket_t").cast().valueTypes("int").pointerTypes("IntPointer"));
+ infoMap.put(new Info("port_t").cast().valueTypes("int").pointerTypes("IntPointer"));
+ infoMap.put(new Info("sockaddr_in").cast().javaNames("org.bytedeco.systems.linux.sockaddr").pointerTypes("Pointer"));
+ infoMap.put(new Info("INVALID_SOCKET").javaText("public static final int INVALID_SOCKET = (int)(-1);"));
+
infoMap.put(new Info("hailort.h").linePatterns("#ifdef __cplusplus", "#endif").skip());
// these variables are defined in HailoHelper
@@ -77,10 +84,10 @@ public void map(InfoMap infoMap) {
// mapping EMPTY_STRUCT_PLACEHOLDER
infoMap.put(new Info("EMPTY_STRUCT_PLACEHOLDER").cast().valueTypes("int").pointerTypes("IntPointer"));
- infoMap.put(new Info("hailo_demux_params_t").pointerTypes("hailo_demux_params_t"));
- infoMap.put(new Info("hailo_pcie_input_stream_params_t").pointerTypes("hailo_pcie_input_stream_params_t"));
- infoMap.put(new Info("hailo_pcie_output_stream_params_t").pointerTypes("hailo_pcie_output_stream_params_t"));
- infoMap.put(new Info("hailo_integrated_input_stream_params_t").pointerTypes("hailo_integrated_input_stream_params_t"));
- infoMap.put(new Info("hailo_integrated_output_stream_params_t").pointerTypes("hailo_integrated_output_stream_params_t"));
+// infoMap.put(new Info("hailo_demux_params_t").pointerTypes("hailo_demux_params_t"));
+// infoMap.put(new Info("hailo_pcie_input_stream_params_t").pointerTypes("hailo_pcie_input_stream_params_t"));
+// infoMap.put(new Info("hailo_pcie_output_stream_params_t").pointerTypes("hailo_pcie_output_stream_params_t"));
+// infoMap.put(new Info("hailo_integrated_input_stream_params_t").pointerTypes("hailo_integrated_input_stream_params_t"));
+// infoMap.put(new Info("hailo_integrated_output_stream_params_t").pointerTypes("hailo_integrated_output_stream_params_t"));
}
}
diff --git a/hailort/src/main/java9/module-info.java b/hailort/src/main/java9/module-info.java
new file mode 100644
index 0000000000..61fe665b4a
--- /dev/null
+++ b/hailort/src/main/java9/module-info.java
@@ -0,0 +1,6 @@
+module org.bytedeco.hailort {
+ requires transitive org.bytedeco.javacpp;
+ exports org.bytedeco.hailort.global;
+ exports org.bytedeco.hailort.presets;
+ exports org.bytedeco.hailort;
+}