proper arch??
@@ -108,12 +108,13 @@ jnigen{
}
add(MacOsX, x64)
- //add(MacOsX, x64, ARM)
+ add(MacOsX, x64, ARM)
all{
if(it.os == BuildTarget.TargetOs.MacOsX){
- cppFlags = cFlags= execCmd("sdl2-config --cflags") + " -c -Wall -O2 -arch x86_64 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.9 -stdlib=libc++"
- linkerFlags = "-shared -arch x86_64 -mmacosx-version-min=10.9 -stdlib=libc++"
+ def arch = it.isARM ? "arm64" : "x86_64"
+ cppFlags = cFlags = execCmd("sdl2-config --cflags") + " -c -Wall -O2 -arch ${arch} -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.9 -stdlib=libc++"
+ linkerFlags = "-shared -arch ${arch} -mmacosx-version-min=10.9 -stdlib=libc++"
//execCmd("sdl2-config --static-libs") + " -Wl,-framework,OpenGL"
libraries = "/usr/local/lib/libSDL2.a -lm -liconv -Wl,-framework,CoreAudio -Wl,-weak_framework,GameController -Wl,-framework,OpenGL,-weak_framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal /usr/local/lib/libGLEW.a"
}
