diff --git a/vendor/raylib/raygui.odin b/vendor/raylib/raygui.odin index a15467ae897..a590566bad4 100644 --- a/vendor/raylib/raygui.odin +++ b/vendor/raylib/raygui.odin @@ -3,8 +3,11 @@ package raylib import "core:c" RAYGUI_SHARED :: #config(RAYGUI_SHARED, false) +RAYGUI_SYSTEM :: #config(RAYGUI_SYSTEM, false) -when ODIN_OS == .Windows { +when RAYGUI_SYSTEM { + foreign import lib "system:raygui" +} else when ODIN_OS == .Windows { foreign import lib { "windows/rayguidll.lib" when RAYGUI_SHARED else "windows/raygui.lib", } diff --git a/vendor/raylib/raylib.odin b/vendor/raylib/raylib.odin index 34a803b994a..0cb452687db 100644 --- a/vendor/raylib/raylib.odin +++ b/vendor/raylib/raylib.odin @@ -100,8 +100,11 @@ 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_SYSTEM :: #config(RAYLIB_SYSTEM, false) -when ODIN_OS == .Windows { +when RAYLIB_SYSTEM { + foreign import lib "system:raylib" +} else when ODIN_OS == .Windows { @(extra_linker_flags="/NODEFAULTLIB:" + ("msvcrt" when RAYLIB_SHARED else "libcmt")) foreign import lib { "windows/raylibdll.lib" when RAYLIB_SHARED else "windows/raylib.lib" , diff --git a/vendor/raylib/rlgl/rlgl.odin b/vendor/raylib/rlgl/rlgl.odin index 40913cd505d..e9f070e39df 100644 --- a/vendor/raylib/rlgl/rlgl.odin +++ b/vendor/raylib/rlgl/rlgl.odin @@ -113,13 +113,16 @@ import rl "../." VERSION :: "5.0" RAYLIB_SHARED :: #config(RAYLIB_SHARED, false) +RAYLIB_SYSTEM :: #config(RAYLIB_SYSTEM, false) // Note: We pull in the full raylib library. If you want a truly stand-alone rlgl, then: // - Compile a separate rlgl library and use that in the foreign import blocks below. // - Remove the `import rl "../."` line // - Copy the code from raylib.odin for any types we alias from that package (see PixelFormat etc) -when ODIN_OS == .Windows { +when RAYLIB_SYSTEM { + foreign import lib "system:raylib" +} else when ODIN_OS == .Windows { @(extra_linker_flags="/NODEFAULTLIB:" + ("msvcrt" when RAYLIB_SHARED else "libcmt")) foreign import lib { "../windows/raylibdll.lib" when RAYLIB_SHARED else "../windows/raylib.lib" ,