Fix: Fix Ninja build for LuaJit and Lua51 (#303)

This commit is contained in:
iThorgrim
2025-09-02 12:47:23 +02:00
committed by GitHub
parent 4acc340bf5
commit 059c20f3ac
2 changed files with 4 additions and 6 deletions

View File

@@ -34,11 +34,9 @@
#include <cstdint> #include <cstdint>
#include "ElunaCompat.h" #include "ElunaCompat.h"
extern "C" { #if LUA_VERSION_NUM == 501 && !defined(luaL_setfuncs)
#include "lua.h" #define luaL_setfuncs(L, l, n) luaL_register(L, NULL, l)
#include "lualib.h" #endif
#include "lauxlib.h"
}
#define MAR_TREF 1 #define MAR_TREF 1
#define MAR_TVAL 2 #define MAR_TVAL 2

View File

@@ -138,7 +138,7 @@ if (UNIX OR APPLE)
add_custom_command( add_custom_command(
OUTPUT ${LUAJIT_LIB_PATH} OUTPUT ${LUAJIT_LIB_PATH}
# COMMAND $(MAKE) -C ${LUA_BIN_FOLDER} PREFIX=${LUA_INSTALL_PATH} # COMMAND $(MAKE) -C ${LUA_BIN_FOLDER} PREFIX=${LUA_INSTALL_PATH}
COMMAND $(MAKE) -C ${LUA_BIN_FOLDER} install PREFIX=${LUA_INSTALL_PATH} "CFLAGS=-O2 -fomit-frame-pointer -Wno-empty-body -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-sign-compare -Wno-string-plus-int" COMMAND make -C ${LUA_BIN_FOLDER} install PREFIX=${LUA_INSTALL_PATH} "CFLAGS=-O2 -fomit-frame-pointer -Wno-empty-body -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-sign-compare -Wno-string-plus-int"
) )
# endif() # endif()
add_custom_target(luajit_target DEPENDS ${LUAJIT_LIB_PATH}) add_custom_target(luajit_target DEPENDS ${LUAJIT_LIB_PATH})