mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 15:23:15 +00:00
Have default foreign import system paths
This commit is contained in:
2
vendor/commonmark/cmark.odin
vendored
2
vendor/commonmark/cmark.odin
vendored
@@ -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 {
|
||||
|
||||
7
vendor/stb/image/stb_image.odin
vendored
7
vendor/stb/image/stb_image.odin
vendored
@@ -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))
|
||||
|
||||
|
||||
8
vendor/stb/image/stb_image_resize.odin
vendored
8
vendor/stb/image/stb_image_resize.odin
vendored
@@ -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" }
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
7
vendor/stb/image/stb_image_write.odin
vendored
7
vendor/stb/image/stb_image_write.odin
vendored
@@ -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)
|
||||
|
||||
7
vendor/stb/rect_pack/stb_rect_pack.odin
vendored
7
vendor/stb/rect_pack/stb_rect_pack.odin
vendored
@@ -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)
|
||||
|
||||
7
vendor/stb/truetype/stb_truetype.odin
vendored
7
vendor/stb/truetype/stb_truetype.odin
vendored
@@ -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" }
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
7
vendor/stb/vorbis/stb_vorbis.odin
vendored
7
vendor/stb/vorbis/stb_vorbis.odin
vendored
@@ -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