Skip to content

Commit

Permalink
Fix compatibility flag for standard Lua libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Apr 1, 2024
1 parent 1affb9e commit edcbc7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ elseif(WIN32)
endif()

# Add Lua compatibility definition
if(NOT TARGET lualib)
if(TARGET lualib)
target_compile_definitions(lualib PUBLIC LUA_COMPAT_MODULE)
endif()

Expand Down

1 comment on commit edcbc7a

@iThorgrim
Copy link
Contributor

@iThorgrim iThorgrim commented on edcbc7a Apr 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not compatible with LuaJit

-- Lua version: luajit
-- Lua linking: dynamic
CMake Error at src/server/game/LuaEngine/CMakeLists.txt:12 (target_compile_definitions):
  target_compile_definitions may only set INTERFACE properties on IMPORTED
  targets

-- Configuring incomplete, errors occurred!

Error when compile Lua53 and Lua54:
LuaEngine/ElunaLoader.cpp:212:19: error: too few arguments to function 'int lua_dump(lua_State*, lua_Writer, void*, int)'
212 | lua_dump(L, (lua_Writer)LoadBytecodeChunk, &script.bytecode);

Please sign in to comment.