Merge branch 'dev' into fs_support

This commit is contained in:
Brad Beveridge
2025-03-29 17:13:47 +13:00
3 changed files with 39 additions and 10 deletions

View File

@ -38,7 +38,7 @@ download from the GitHub releases page.
### Installing on Windows ### Installing on Windows
Download the **.dll** of the release you want, and place it in the **root** of your Go project. Download the **.dll** of the [release you want](https://github.com/bloeys/assimp-go/releases), and place it in the **root** of your Go project.
### Installing on MacOS ### Installing on MacOS
@ -47,6 +47,27 @@ Next you will need to rename the lib to `libassimp.5.dylib` and move it to `/usr
You can use this command to do it: `sudo mkdir -p /usr/local/lib && sudo cp libassimp_darwin*.dylib /usr/local/lib/libassimp.5.dylib` You can use this command to do it: `sudo mkdir -p /usr/local/lib && sudo cp libassimp_darwin*.dylib /usr/local/lib/libassimp.5.dylib`
### Installing on Linux
Download the the AssImp package for your distro, or build from source and add it to your path.
> NOTE: Insatall assimp >= 3.1 for bindings to work as expected.
> Though getting the latest version is always recommended.
#### Installing on Ubuntu
You can install the Asset-Importer-Lib via apt:
```
sudo apt-get update
sudo apt-get install libassimp-dev
```
#### Installing on Arch
You can install the Asset-Importer-Lib via pacman
```
sudo pacman -S assimp
```
#### Building From Source
To build the Asset Importer Package from sorce read the [sorce build guide](https://github.com/assimp/assimp/blob/master/Build.md)
### Running assimp-go ### Running assimp-go
Use `go run .` to run the simple example in `main.go` ;) Use `go run .` to run the simple example in `main.go` ;)

View File

@ -1,11 +1,14 @@
package asig package asig
/* /*
#cgo CFLAGS: -I . #cgo linux CFLAGS:
#cgo LDFLAGS: -L libs #cgo windows,amd64 CFLAGS: -I .
#cgo windows,amd64 LDFLAGS: -l assimp_windows_amd64 #cgo darwin,amd64 CFLAGS: -I .
#cgo darwin,amd64 LDFLAGS: -l assimp_darwin_amd64 #cgo darwin,arm64 CFLAGS: -I .
#cgo darwin,arm64 LDFLAGS: -l assimp
#cgo linux LDFLAGS: -lassimp
#cgo windows,amd64 LDFLAGS: -L libs -l assimp_windows_amd64
#cgo darwin,amd64 LDFLAGS: -L libs -l assimp_darwin_amd64
#cgo darwin,arm64 LDFLAGS: -Wl,-rpath,/usr/local/lib #cgo darwin,arm64 LDFLAGS: -Wl,-rpath,/usr/local/lib
#include "wrap.h" #include "wrap.h"

View File

@ -1,10 +1,15 @@
package asig package asig
/* /*
#cgo CFLAGS: -I . #cgo linux CFLAGS:
#cgo LDFLAGS: -L libs #cgo windows,amd64 CFLAGS: -I .
#cgo windows,amd64 LDFLAGS: -l assimp_windows_amd64 #cgo darwin,amd64 CFLAGS: -I .
#cgo darwin,arm64 LDFLAGS: -l assimp_darwin_arm64 #cgo darwin,arm64 CFLAGS: -I .
#cgo linux LDFLAGS: -lassimp
#cgo windows,amd64 LDFLAGS: -L libs -l assimp_windows_amd64
#cgo darwin,amd64 LDFLAGS: -L libs -l assimp_darwin_amd64
#cgo darwin,arm64 LDFLAGS: -L libs -l assimp_darwin_arm64
#include "wrap.h" #include "wrap.h"
*/ */