Add option to link to glfw3 dynamically

This commit is contained in:
bumbread
2023-03-01 03:05:04 +11:00
parent dfee7c103e
commit 0d65c6dcf7
3 changed files with 25 additions and 7 deletions
+17 -6
View File
@@ -3,13 +3,24 @@ package glfw_bindings
import "core:c"
import vk "vendor:vulkan"
GLFW_DYNAMIC :: #config(GLFW_DYNAMIC, false)
when ODIN_OS == .Windows {
foreign import glfw {
"../lib/glfw3_mt.lib",
"system:user32.lib",
"system:gdi32.lib",
"system:shell32.lib",
}
when GLFW_DYNAMIC {
foreign import glfw {
"../lib/glfw3dll.lib",
"system:user32.lib",
"system:gdi32.lib",
"system:shell32.lib",
}
} else {
foreign import glfw {
"../lib/glfw3mt.lib",
"system:user32.lib",
"system:gdi32.lib",
"system:shell32.lib",
}
}
} else when ODIN_OS == .Linux {
// TODO: Add the billion-or-so static libs to link to in linux
foreign import glfw "system:glfw"