Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#15 JNBullet does not have Mac aarch64 target #16

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ TeraBullet is a version of bullet with extensions for direct interactions for vo
- linux_windows_amd64_mingw32.cmake
- linux_windows_i686_mingw32.cmake
- macosx_amd64_clang.cmake
- macosx_aarch64_clang.cmake
- windows_amd64_msvc.cmake
- windows_i386_msvc.cmake

Expand Down Expand Up @@ -77,6 +78,7 @@ To build the java portion of bullet, simply run `./gradlew build`
* mac
- i686
- amd64
- aarch64

### System prerequisites

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ plugins {
import org.apache.tools.ant.taskdefs.condition.Os
ext {
if(Os.isFamily(Os.FAMILY_MAC)) {
natives = ["macosx_amd64_clang"]
natives = ["macosx_amd64_clang","macosx_aarch64_clang"]
} else if (Os.isFamily(Os.FAMILY_UNIX)) {
natives = ["linux_amd64_gcc","linux_i686_gcc","linux_windows_amd64_mingw32","linux_windows_i686_mingw32"]
} else {
throw new GradleException("This script only works on Linux or Mac")
}

allNatives = ["linux_amd64_gcc","linux_i686_gcc","linux_windows_amd64_mingw32","linux_windows_i686_mingw32","macosx_amd64_clang"]
allNatives = ["linux_amd64_gcc","linux_i686_gcc","linux_windows_amd64_mingw32","linux_windows_i686_mingw32","macosx_amd64_clang","macosx_aarch64_clang"]

generatedSrcDir = 'src/generated/java'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.0.3-SNAPSHOT
version=1.0.4-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public final class NativeSupport {
static boolean isWindows = System.getProperty("os.name").toLowerCase().contains("win");
static boolean isMacOS = System.getProperty("os.name").toLowerCase().contains("mac");
static boolean is64 = System.getProperty("os.arch").endsWith("64");
static boolean isArm = System.getProperty("os.arch").endsWith("aarch64");

private static final Pattern PATH_SEPARATOR = Pattern.compile(File.pathSeparator);

Expand Down Expand Up @@ -80,7 +81,9 @@ public static void load(String name) {
target += "linux-";
}

if (is64) {
if (isArm) {
target += "aarch64";
} else if (is64) {
// Assume x86_64
target += "amd64";
} else {
Expand Down
24 changes: 24 additions & 0 deletions toolchains/macosx_aarch64_clang.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2015, alex at staticlibs.net
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required ( VERSION 2.8.12 )

# default to Debug
set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING "Default build type" )

set ( CMAKE_SYSTEM_NAME Darwin )
set ( CMAKE_SYSTEM_ARCH aarch64)

set ( CMAKE_C_COMPILER clang )
set ( CMAKE_CXX_COMPILER clang++ )