Support apple silicon

This commit is contained in:
bloeys
2022-01-22 07:31:02 +04:00
parent 1ef22874f5
commit 02fd276728
5 changed files with 13 additions and 24 deletions

4
.gitignore vendored
View File

@ -15,4 +15,6 @@
vendor/
*.obj
*.fbx
*.glb
*.glb
!libassimp_darwin_arm64.dylib
.DS_Store

View File

@ -1,12 +1,13 @@
package asig
/*
//Note: We don't link directly to libIrrXML and libzlib libraries in `./libs`, but they are required by assimp. Removing them will error on compilation.
#cgo CFLAGS: -I .
#cgo LDFLAGS: -L ./libs -l assimp_windows_amd64
#cgo LDFLAGS: -L libs
#cgo windows,amd64 LDFLAGS: -l assimp_windows_amd64
#cgo darwin,arm64 LDFLAGS: -l assimp_darwin_arm64
#include <wrap.cxx>
#include <stdlib.h> //Needed for C.free
#include "wrap.c"
#include <stdlib.h>
*/
import "C"
import (

Binary file not shown.

View File

@ -2,26 +2,12 @@ package asig
/*
#cgo CFLAGS: -I .
#cgo LDFLAGS: -L ./libs -l assimp_windows_amd64 -l IrrXML_windows_amd64 -l zlib_windows_amd64
#cgo LDFLAGS: -L libs
#cgo windows,amd64 LDFLAGS: -l assimp_windows_amd64
#cgo darwin,arm64 LDFLAGS: -l assimp_darwin_arm64
#include <stdlib.h> //Needed for C.free
#include <assimp/scene.h>
//Functions
unsigned int aiGetMaterialTextureCount(const struct aiMaterial* pMat, enum aiTextureType type);
enum aiReturn aiGetMaterialTexture(
const struct aiMaterial* mat,
enum aiTextureType type,
unsigned int index,
struct aiString* path,
enum aiTextureMapping* mapping,
unsigned int* uvindex,
ai_real* blend,
enum aiTextureOp* op,
enum aiTextureMapMode* mapmode,
unsigned int* flags);
#include "wrap.c"
#include <stdlib.h>
*/
import "C"
import (