openlierox
openlierox copied to clipboard
Lua linking issue on modern systems
If LIBLUA_BUILTIN is not set, Cmake searches for "lua", then "lua5.1" and if neither is found, defaults to "lua" when setting up linking. But on some modern systems, searching for "lua" gives a newer version such as 5.3 which doesn't work.
Also, searching for "lua5.1" may not find anything (seem to be the case on Arch Linux) so reversing the search order wouldn't work, it would still use "lua".
Would it make sense to just set it to lua5.1 (until someone changes the code to use newer version)? Many systems nowadays probably have newer versions so the default "lua" would be wrong anyway. If lua5.1 doesn't work for someone, the builtin lib is always there.
edit: Also, the header directory is set to /usr/include/lua5.1 so I think it would be perfectly consistent to always use lua5.1 as linking option.