mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-03 18:14:01 +00:00
Fix cmake build + disable "unsafe" Lua package table
This commit is contained in:
parent
86d2fcebda
commit
8b0ccb2ee4
2 changed files with 8 additions and 2 deletions
|
@ -10682,6 +10682,8 @@ lua_State *ScriptInterface::createLuaVM()
|
|||
lua_setglobal(state, "os");
|
||||
lua_pushnil(state);
|
||||
lua_setglobal(state, "io");
|
||||
lua_pushnil(state);
|
||||
lua_setglobal(state, "package");
|
||||
}
|
||||
|
||||
// Set up various tables for state management:
|
||||
|
|
|
@ -180,7 +180,7 @@ if(NOT SDL_FOUND)
|
|||
else(AQUARIA_USE_SDL2)
|
||||
set(SDLDIR "${EXTLIBDIR}/SDL12")
|
||||
endif(AQUARIA_USE_SDL2)
|
||||
|
||||
|
||||
if(MACOSX)
|
||||
set(SDL_INCLUDE_DIR "${SDLDIR}/include")
|
||||
message(STATUS "Using internal copy of SDL")
|
||||
|
@ -333,7 +333,7 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
|||
IF(AQUARIA_GCC_HAS_STACKPROT)
|
||||
ADD_DEFINITIONS(-fno-stack-protector)
|
||||
ENDIF(AQUARIA_GCC_HAS_STACKPROT)
|
||||
|
||||
|
||||
# -O3 breaks on some GCC/MinGW versions, make sure CMake does not set this as default.
|
||||
# Exceptions are not used, excluding support for release builds adds less bulk as well.
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Flags used for release builds" FORCE)
|
||||
|
@ -661,9 +661,13 @@ SET(LUA_SRCS
|
|||
${LUASRCDIR}/ldump.c
|
||||
${LUASRCDIR}/lfunc.c
|
||||
${LUASRCDIR}/lgc.c
|
||||
${LUASRCDIR}/linit.c
|
||||
${LUASRCDIR}/liolib.c
|
||||
${LUASRCDIR}/lmem.c
|
||||
${LUASRCDIR}/loadlib.c
|
||||
${LUASRCDIR}/lobject.c
|
||||
${LUASRCDIR}/lopcodes.c
|
||||
${LUASRCDIR}/loslib.c
|
||||
${LUASRCDIR}/lstate.c
|
||||
${LUASRCDIR}/lstring.c
|
||||
${LUASRCDIR}/ltable.c
|
||||
|
|
Loading…
Add table
Reference in a new issue