mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-13 01:21:38 -07:00
Have default foreign import system paths
This commit is contained in:
Vendored
+2
@@ -25,6 +25,8 @@ when ODIN_OS == .Windows {
|
||||
foreign import lib "system:cmark"
|
||||
} else when ODIN_OS == .Darwin {
|
||||
foreign import lib "system:cmark"
|
||||
} else {
|
||||
foreign import lib "system:cmark"
|
||||
}
|
||||
|
||||
Option :: enum c.int {
|
||||
|
||||
Vendored
+4
-3
@@ -4,9 +4,10 @@ import c "core:c/libc"
|
||||
|
||||
#assert(size_of(c.int) == size_of(b32))
|
||||
|
||||
when ODIN_OS == .Windows { foreign import stbi "../lib/stb_image.lib" }
|
||||
when ODIN_OS == .Linux { foreign import stbi "../lib/stb_image.a" }
|
||||
when ODIN_OS == .Darwin { foreign import stbi "../lib/darwin/stb_image.a" }
|
||||
when ODIN_OS == .Windows { foreign import stbi "../lib/stb_image.lib" }
|
||||
else when ODIN_OS == .Linux { foreign import stbi "../lib/stb_image.a" }
|
||||
else when ODIN_OS == .Darwin { foreign import stbi "../lib/darwin/stb_image.a" }
|
||||
else { foreign import stbi "system:stb_image" }
|
||||
|
||||
#assert(size_of(b32) == size_of(c.int))
|
||||
|
||||
|
||||
+5
-3
@@ -2,9 +2,11 @@ package stb_image
|
||||
|
||||
import c "core:c/libc"
|
||||
|
||||
when ODIN_OS == .Windows { foreign import lib "../lib/stb_image_resize.lib" }
|
||||
when ODIN_OS == .Linux { foreign import lib "../lib/stb_image_resize.a" }
|
||||
when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_image_resize.a" }
|
||||
when ODIN_OS == .Windows { foreign import lib "../lib/stb_image_resize.lib" }
|
||||
else when ODIN_OS == .Linux { foreign import lib "../lib/stb_image_resize.a" }
|
||||
else when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_image_resize.a" }
|
||||
else { foreign import stbi "system:stb_image_resize" }
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
+4
-3
@@ -2,9 +2,10 @@ package stb_image
|
||||
|
||||
import c "core:c/libc"
|
||||
|
||||
when ODIN_OS == .Windows { foreign import stbiw "../lib/stb_image_write.lib" }
|
||||
when ODIN_OS == .Linux { foreign import stbiw "../lib/stb_image_write.a" }
|
||||
when ODIN_OS == .Darwin { foreign import stbiw "../lib/darwin/stb_image_write.a" }
|
||||
when ODIN_OS == .Windows { foreign import stbiw "../lib/stb_image_write.lib" }
|
||||
else when ODIN_OS == .Linux { foreign import stbiw "../lib/stb_image_write.a" }
|
||||
else when ODIN_OS == .Darwin { foreign import stbiw "../lib/darwin/stb_image_write.a" }
|
||||
else { foreign import stbi "system:stb_image_write" }
|
||||
|
||||
|
||||
write_func :: proc "c" (ctx: rawptr, data: rawptr, size: c.int)
|
||||
|
||||
+4
-3
@@ -4,9 +4,10 @@ import c "core:c/libc"
|
||||
|
||||
#assert(size_of(b32) == size_of(c.int))
|
||||
|
||||
when ODIN_OS == .Windows { foreign import lib "../lib/stb_rect_pack.lib" }
|
||||
when ODIN_OS == .Linux { foreign import lib "../lib/stb_rect_pack.a" }
|
||||
when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_rect_pack.a" }
|
||||
when ODIN_OS == .Windows { foreign import lib "../lib/stb_rect_pack.lib" }
|
||||
else when ODIN_OS == .Linux { foreign import lib "../lib/stb_rect_pack.a" }
|
||||
else when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_rect_pack.a" }
|
||||
else { foreign import lib "system:stb_rect_pack" }
|
||||
|
||||
Coord :: distinct c.int
|
||||
_MAXVAL :: max(Coord)
|
||||
|
||||
+4
-3
@@ -3,9 +3,10 @@ package stb_truetype
|
||||
import c "core:c"
|
||||
import stbrp "vendor:stb/rect_pack"
|
||||
|
||||
when ODIN_OS == .Windows { foreign import stbtt "../lib/stb_truetype.lib" }
|
||||
when ODIN_OS == .Linux { foreign import stbtt "../lib/stb_truetype.a" }
|
||||
when ODIN_OS == .Darwin { foreign import stbtt "../lib/darwin/stb_truetype.a" }
|
||||
when ODIN_OS == .Windows { foreign import stbtt "../lib/stb_truetype.lib" }
|
||||
else when ODIN_OS == .Linux { foreign import stbtt "../lib/stb_truetype.a" }
|
||||
else when ODIN_OS == .Darwin { foreign import stbtt "../lib/darwin/stb_truetype.a" }
|
||||
else { foreign import stbtt "system:stb_truetype" }
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Vendored
+4
-3
@@ -3,9 +3,10 @@ package stb_vorbis
|
||||
import c "core:c/libc"
|
||||
|
||||
|
||||
when ODIN_OS == .Windows { foreign import lib "../lib/stb_vorbis.lib" }
|
||||
when ODIN_OS == .Linux { foreign import lib "../lib/stb_vorbis.a" }
|
||||
when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_vorbis.a" }
|
||||
when ODIN_OS == .Windows { foreign import lib "../lib/stb_vorbis.lib" }
|
||||
else when ODIN_OS == .Linux { foreign import lib "../lib/stb_vorbis.a" }
|
||||
else when ODIN_OS == .Darwin { foreign import lib "../lib/darwin/stb_vorbis.a" }
|
||||
else { foreign import lib "system:stb_vorbis" }
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user