mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Merge pull request #4302 from Pariatech/enable_static_glfw_linux
Add static GLFW bindings for Linux
This commit is contained in:
Vendored
+12
-2
@@ -3,7 +3,7 @@ package glfw_bindings
|
|||||||
import "core:c"
|
import "core:c"
|
||||||
import vk "vendor:vulkan"
|
import vk "vendor:vulkan"
|
||||||
|
|
||||||
GLFW_SHARED :: #config(GLFW_SHARED, false)
|
GLFW_SHARED :: #config(GLFW_SHARED, ODIN_OS != .Windows && ODIN_OS != .Darwin)
|
||||||
|
|
||||||
when ODIN_OS == .Windows {
|
when ODIN_OS == .Windows {
|
||||||
when GLFW_SHARED {
|
when GLFW_SHARED {
|
||||||
@@ -38,7 +38,17 @@ when ODIN_OS == .Windows {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreign import glfw "system:glfw"
|
when GLFW_SHARED {
|
||||||
|
foreign import glfw "system:glfw"
|
||||||
|
} else {
|
||||||
|
@(private)
|
||||||
|
LIBGLFW3 :: "../lib/libglfw3.a"
|
||||||
|
when !#exists(LIBGLFW3) {
|
||||||
|
#panic("Could not find the static glfw library, add it at \"" + ODIN_ROOT + "vendor/glfw/lib/\"`")
|
||||||
|
}
|
||||||
|
|
||||||
|
foreign import glfw { LIBGLFW3 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#assert(size_of(c.int) == size_of(b32))
|
#assert(size_of(c.int) == size_of(b32))
|
||||||
|
|||||||
Reference in New Issue
Block a user