diff --git a/README.md b/README.md index 05dcf2c..712517c 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,15 @@ $ git submodule update --init --recursive # Required cmake (version >= 3.10.2) + +# for m1 +```shell + cd cpp && mkdir build && cd build + CC=cc cmake .. + brew install cargo + brew install libtool + brew install automake + make + cp libzksnarkjni.dylib cp libzksnarkjni.dylib ../../src/main/resources/native-package/macos/aarch64 + +``` diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 7d2ae52..0c03b1a 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -8,14 +8,16 @@ set(CMAKE_BUILD_TYPE Release) SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall -DNDEBUG") find_package( Threads ) find_package(Java REQUIRED) -find_package(JNI REQUIRED) +# find_package(JNI REQUIRED) include(UseJava) include(ExternalProject) include_directories(include) -include_directories(${JNI_INCLUDE_DIRS}) -include_directories(${JAVA_INCLUDE_PATH}) -include_directories(${JAVA_INCLUDE_PATH2}) +# include_directories(${JNI_INCLUDE_DIRS}) +# include_directories(${JAVA_INCLUDE_PATH}) +# include_directories(${JAVA_INCLUDE_PATH2}) +include_directories($ENV{JAVA_HOME}/include) +include_directories($ENV{JAVA_HOME}/include/darwin) link_directories(lib) diff --git a/src/main/resources/native-package/macos/aarch64/.gitkeep b/src/main/resources/native-package/macos/aarch64/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/resources/native-package/macos/aarch64/libzksnarkjni.dylib b/src/main/resources/native-package/macos/aarch64/libzksnarkjni.dylib new file mode 100755 index 0000000..1300365 Binary files /dev/null and b/src/main/resources/native-package/macos/aarch64/libzksnarkjni.dylib differ