mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Added WASM libs for raylib and raygui. Added them to the foreign import blocks, with optional ways to override them. These overrides can be used to use alterantive libs when using for example emscripten.
This commit is contained in:
Vendored
+5
@@ -100,6 +100,7 @@ MAX_TEXT_BUFFER_LENGTH :: #config(RAYLIB_MAX_TEXT_BUFFER_LENGTH, 1024)
|
||||
#assert(size_of(rune) == size_of(c.int))
|
||||
|
||||
RAYLIB_SHARED :: #config(RAYLIB_SHARED, false)
|
||||
RAYLIB_WASM_LIB :: #config(RAYLIB_WASM_LIB, "wasm/libraylib.a")
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
@(extra_linker_flags="/NODEFAULTLIB:" + ("msvcrt" when RAYLIB_SHARED else "libcmt"))
|
||||
@@ -127,6 +128,10 @@ when ODIN_OS == .Windows {
|
||||
"system:OpenGL.framework",
|
||||
"system:IOKit.framework",
|
||||
}
|
||||
} else when ODIN_ARCH == .wasm32 || ODIN_ARCH == .wasm64p32 {
|
||||
foreign import lib {
|
||||
RAYLIB_WASM_LIB,
|
||||
}
|
||||
} else {
|
||||
foreign import lib "system:raylib"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user