From 72cbe13a9bec2abea8f54e2cbec109d0bb03d97a Mon Sep 17 00:00:00 2001 From: Alexander Arvidsson <2972103+AlexanderArvidsson@users.noreply.github.com> Date: Sat, 28 Dec 2024 03:56:59 +0100 Subject: [PATCH] gen_odin.py: Use shared linux libraries if USE_DLL --- bindgen/gen_odin.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bindgen/gen_odin.py b/bindgen/gen_odin.py index 497d756cf..45bb0364f 100644 --- a/bindgen/gen_odin.py +++ b/bindgen/gen_odin.py @@ -401,8 +401,13 @@ def gen_c_imports(inp, c_prefix, prefix): l( ' }') l( ' }') l( '} else when ODIN_OS == .Linux {') - l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.a"{linux_gl_libs} }} }}') - l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.a"{linux_gl_libs} }} }}') + l( ' when USE_DLL {') + l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.so"{linux_gl_libs} }} }}') + l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.so"{linux_gl_libs} }} }}') + l( ' } else {') + l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.a"{linux_gl_libs} }} }}') + l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.a"{linux_gl_libs} }} }}') + l( ' }') l( '} else {') l( ' #panic("This OS is currently not supported")') l( '}')