diff --git a/.github/workflows/lz4.yml b/.github/workflows/lz4.yml
index 76806668c12..440062aa476 100644
--- a/.github/workflows/lz4.yml
+++ b/.github/workflows/lz4.yml
@@ -27,6 +27,10 @@ jobs:
container: centos:7
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-centos@actions
+ macosx-arm64:
+ runs-on: macos-11
+ steps:
+ - uses: bytedeco/javacpp-presets/.github/actions/deploy-macosx@actions
macosx-x86_64:
runs-on: macos-11
steps:
@@ -40,7 +44,7 @@ jobs:
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions
redeploy:
- needs: [linux-x86, linux-x86_64, macosx-x86_64, windows-x86, windows-x86_64]
+ needs: [linux-x86, linux-x86_64, macosx-arm64, macosx-x86_64, windows-x86, windows-x86_64]
runs-on: ubuntu-20.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/redeploy@actions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f2a5cbef02b..5f1f316326e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,7 +10,7 @@
* Include missing `opencv2/mcc/ccm.hpp` header file in presets for OpenCV ([discussion bytedeco/javacpp#568](https://github.com/bytedeco/javacpp/discussions/568))
* Fix a few incorrectly mapped instances of `std::unordered_map` for PyTorch ([issue #1164](https://github.com/bytedeco/javacpp-presets/issues/1164))
* Migrate builds for Leptonica and Tesseract to CMake ([issue #1163](https://github.com/bytedeco/javacpp-presets/issues/1163))
- * Introduce `macosx-arm64` builds for libffi ([issue #1182](https://github.com/bytedeco/javacpp-presets/issues/1182)), Leptonica, and Tesseract ([issue #814](https://github.com/bytedeco/javacpp-presets/issues/814))
+ * Introduce `macosx-arm64` builds for lz4 ([pull #1243](https://github.com/bytedeco/javacpp-presets/pull/1243)), libffi ([issue #1182](https://github.com/bytedeco/javacpp-presets/issues/1182)), Leptonica, and Tesseract ([issue #814](https://github.com/bytedeco/javacpp-presets/issues/814))
* Map instances of `torch::OrderedDict` using C++ templates from PyTorch ([issue #623](https://github.com/bytedeco/javacpp-presets/issues/623))
* Add presets for Bullet Physics SDK 3.24 ([pull #1153](https://github.com/bytedeco/javacpp-presets/pull/1153))
* Add `long[] pytorch.Tensor.shape()` method for convenience ([pull #1161](https://github.com/bytedeco/javacpp-presets/pull/1161))
diff --git a/lz4/cppbuild.sh b/lz4/cppbuild.sh
index 63d253945f7..13ec76d39b9 100755
--- a/lz4/cppbuild.sh
+++ b/lz4/cppbuild.sh
@@ -25,10 +25,18 @@ case $PLATFORM in
CC="gcc -m64 -fPIC" make -j $MAKEJ
PREFIX=$INSTALL_PATH make install
;;
+ macosx-arm64)
+ export CC="clang -arch arm64"
+ export CXX="clang++ -arch arm64"
+ make -j $MAKEJ
+ PREFIX=$INSTALL_PATH make install
+ # fix library with correct rpath
+ install_name_tool -add_rpath @loader_path/. -id @rpath/liblz4.1.dylib ../lib/liblz4.1.dylib
+ ;;
macosx-x86_64)
make -j $MAKEJ
PREFIX=$INSTALL_PATH make install
- # fix library with correct rpath
+ # fix library with correct rpath
install_name_tool -add_rpath @loader_path/. -id @rpath/liblz4.1.dylib ../lib/liblz4.1.dylib
;;
windows-x86)
diff --git a/lz4/platform/pom.xml b/lz4/platform/pom.xml
index 5fe98b263f6..4b0f2abed28 100644
--- a/lz4/platform/pom.xml
+++ b/lz4/platform/pom.xml
@@ -42,6 +42,12 @@
${project.version}
${javacpp.platform.linux-x86_64}
+
+ ${project.groupId}
+ ${javacpp.moduleId}
+ ${project.version}
+ ${javacpp.platform.macosx-arm64}
+
${project.groupId}
${javacpp.moduleId}
@@ -72,7 +78,7 @@
- ${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-macosx-x86_64.jar ${javacpp.moduleId}-windows-x86.jar ${javacpp.moduleId}-windows-x86_64.jar
+ ${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-macosx-arm64.jar ${javacpp.moduleId}-macosx-x86_64.jar ${javacpp.moduleId}-windows-x86.jar ${javacpp.moduleId}-windows-x86_64.jar
@@ -119,6 +125,7 @@
module org.bytedeco.${javacpp.moduleId}.platform {
requires static org.bytedeco.${javacpp.moduleId}.linux.x86;
requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64;
+ requires static org.bytedeco.${javacpp.moduleId}.macosx.arm64;
requires static org.bytedeco.${javacpp.moduleId}.macosx.x86_64;
requires static org.bytedeco.${javacpp.moduleId}.windows.x86;
requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64;
diff --git a/pom.xml b/pom.xml
index df007b07545..d5b686e7067 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1448,6 +1448,7 @@
opencv
ffmpeg
+ lz4
openblas
llvm
libffi