mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-19 12:48:05 +00:00
Add os detection for lib import
This commit is contained in:
parent
115b82a81f
commit
4b16ae7920
@ -2,7 +2,18 @@ package clay
|
|||||||
|
|
||||||
import "core:c"
|
import "core:c"
|
||||||
import "core:strings"
|
import "core:strings"
|
||||||
foreign import Clay "clay.a"
|
|
||||||
|
when ODIN_OS == .Windows {
|
||||||
|
foreign import Clay "windows/clay.lib"
|
||||||
|
} else when ODIN_OS == .Linux {
|
||||||
|
foreign import Clay "linux/libclay.a"
|
||||||
|
} else when ODIN_OS == .Darwin {
|
||||||
|
when ODIN_ARCH == .arm64 {
|
||||||
|
foreign import Clay "macos-arm64/clay.a"
|
||||||
|
} else {
|
||||||
|
foreign import Clay "macos/clay.a"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String :: struct {
|
String :: struct {
|
||||||
length: c.int,
|
length: c.int,
|
||||||
|
Loading…
Reference in New Issue
Block a user