1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-22 14:30:54 +00:00

fix linux/gcc build

This commit is contained in:
fgenesis 2022-04-07 03:11:24 +02:00
parent 49b9e0f05a
commit d34a962e78
6 changed files with 34 additions and 12 deletions

View file

@ -61,4 +61,19 @@ set(lua51_src
# Use C++ exceptions instead of setjmp() & longjmp()
set_source_files_properties(${lua51_src} PROPERTIES LANGUAGE CXX)
# Windows is detected automatically
if(LINUX)
ADD_DEFINITIONS(-DLUA_USE_LINUX)
elseif(APPLE)
ADD_DEFINITIONS(-DLUA_USE_MACOSX)
elseif(POSIX)
ADD_DEFINITIONS(-DLUA_USE_POSIX)
else()
# gcc/ld warns about tmpnam() so we might as well try to get rid of it
CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
IF(HAVE_MKSTEMP)
ADD_DEFINITIONS(-DLUA_USE_MKSTEMP)
ENDIF()
endif()
add_library(lua51 ${lua51_src})