java: Add support for linux-aarch64 and darwin-aarch64 (#2538)

This commit is contained in:
Corentin Le Molgat
2022-05-23 16:39:25 +02:00
parent 34d41226bf
commit 5b3d1e0f58
3 changed files with 26 additions and 4 deletions

View File

@@ -45,9 +45,17 @@ set(JAVA_ARTIFACT "ortools")
set(JAVA_PACKAGE "${JAVA_GROUP}.${JAVA_ARTIFACT}")
if(APPLE)
set(NATIVE_IDENTIFIER darwin-x86-64)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)")
set(NATIVE_IDENTIFIER darwin-aarch64)
else()
set(NATIVE_IDENTIFIER darwin-x86-64)
endif()
elseif(UNIX)
set(NATIVE_IDENTIFIER linux-x86-64)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)")
set(NATIVE_IDENTIFIER linux-aarch64)
else()
set(NATIVE_IDENTIFIER linux-x86-64)
endif()
elseif(WIN32)
set(NATIVE_IDENTIFIER win32-x86-64)
else()

View File

@@ -87,10 +87,24 @@
<type>jar</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>@JAVA_PACKAGE@</groupId>
<artifactId>ortools-linux-aarch64</artifactId>
<version>@PROJECT_VERSION@</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>@JAVA_PACKAGE@</groupId>
<artifactId>ortools-darwin-aarch64</artifactId>
<version>@PROJECT_VERSION@</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>5.8.0</version>
<version>5.11.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>

View File

@@ -76,7 +76,7 @@
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>5.8.0</version>
<version>5.11.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>