Update LUA imports for Darwin.

This commit is contained in:
Jeroen van Rijn
2024-07-20 14:24:01 +02:00
parent 64614889de
commit 2385e1ddd9
4 changed files with 24 additions and 16 deletions
+6 -2
View File
@@ -15,16 +15,20 @@ when LUA_SHARED {
foreign import lib "windows/lua5.1.dll.lib"
} else when ODIN_OS == .Linux {
foreign import lib "linux/liblua5.1.so"
} else when ODIN_OS == .Darwin {
foreign import lib "system:lua5.1"
} else {
foreign import lib "system:liblua.so.5.1"
#panic("LUA import not defined for this platform")
}
} else {
when ODIN_OS == .Windows {
foreign import lib "windows/lua5.1.dll.lib"
} else when ODIN_OS == .Linux {
foreign import lib "linux/liblua5.1.a"
} else when ODIN_OS == .Darwin {
foreign import lib "system:lua5.1"
} else {
foreign import lib "system:liblua5.1.a"
#panic("LUA import not defined for this platform")
}
}
+6 -2
View File
@@ -15,16 +15,20 @@ when LUA_SHARED {
foreign import lib "windows/lua52dll.lib"
} else when ODIN_OS == .Linux {
foreign import lib "linux/liblua52.so"
} else when ODIN_OS == .Darwin {
foreign import lib "system:lua5.2"
} else {
foreign import lib "system:liblua.so.5.2"
#panic("LUA import not defined for this platform")
}
} else {
when ODIN_OS == .Windows {
foreign import lib "windows/lua52dll.lib"
} else when ODIN_OS == .Linux {
foreign import lib "linux/liblua52.a"
} else when ODIN_OS == .Darwin {
foreign import lib "system:lua5.2"
} else {
foreign import lib "system:liblua52.a"
#panic("LUA import not defined for this platform")
}
}
+6 -2
View File
@@ -15,16 +15,20 @@ when LUA_SHARED {
foreign import lib "windows/lua53dll.lib"
} else when ODIN_OS == .Linux {
foreign import lib "linux/liblua53.so"
} else when ODIN_OS == .Darwin {
foreign import lib "system:lua5.3"
} else {
foreign import lib "system:liblua.so.5.3"
#panic("LUA import not defined for this platform")
}
} else {
when ODIN_OS == .Windows {
foreign import lib "windows/lua53dll.lib"
} else when ODIN_OS == .Linux {
foreign import lib "linux/liblua53.a"
} else when ODIN_OS == .Darwin {
foreign import lib "system:lua5.3"
} else {
foreign import lib "system:liblua53.a"
#panic("LUA import not defined for this platform")
}
}
+6 -10
View File
@@ -15,24 +15,20 @@ when LUA_SHARED {
foreign import lib "windows/lua54dll.lib"
} else when ODIN_OS == .Linux {
foreign import lib "linux/liblua54.so"
} else when ODIN_OS == .Darwin {
foreign import lib "system:lua5.4"
} else {
// Note(bumbread): My linux system has a few aliases for this shared object
// lublua5.4.so, liblua.so, lublua.so.5.4, liblua.so.5.4.6. I don't know
// who enforces these numbers (probably ld?), and if it can be done in a
// unix-generic way, but in any way I think the most sane thing to do is to
// keep it close to what linux does and if it breaks, just special case those
// operating systems.
// Also there was no alias for liblua54.so, that seems to suggest that way
// of specifying it isn't portable
foreign import lib "system:liblua.so.5.4"
#panic("LUA import not defined for this platform")
}
} else {
when ODIN_OS == .Windows {
foreign import lib "windows/lua54dll.lib"
} else when ODIN_OS == .Linux {
foreign import lib "linux/liblua54.a"
} else when ODIN_OS == .Darwin {
foreign import lib "system:lua5.4"
} else {
foreign import lib "system:liblua54.a"
#panic("LUA import not defined for this platform")
}
}