Skip to content

Commit

Permalink
feat: add jni for macos-aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
halibobo1205 committed Aug 8, 2022
1 parent 8d56f8e commit 7a96f41
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
10 changes: 6 additions & 4 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Empty file.
Binary file not shown.

0 comments on commit 7a96f41

Please sign in to comment.