2011-08-08 15:19:44 -06:00
|
|
|
PROJECT ( lua C )
|
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE )
|
|
|
|
ELSE()
|
|
|
|
ADD_DEFINITIONS ( -DLUA_USE_POSIX -DLUA_USE_DLOPEN )
|
|
|
|
SET ( LIBS m dl )
|
|
|
|
ENDIF()
|
|
|
|
|
2011-08-08 15:30:30 -06:00
|
|
|
IF(UNIX)
|
|
|
|
add_definitions(-DLINUX_BUILD)
|
|
|
|
SET(CMAKE_C_FLAGS "-m32")
|
|
|
|
ENDIF()
|
|
|
|
|
2011-08-08 15:19:44 -06:00
|
|
|
# Build Libraries
|
|
|
|
SET (SRC_LIBLUA
|
|
|
|
src/lapi.c
|
2011-08-13 16:09:59 -06:00
|
|
|
src/lauxlib.c
|
|
|
|
src/lbaselib.c
|
2011-08-08 15:19:44 -06:00
|
|
|
src/lcode.c
|
2011-08-13 16:09:59 -06:00
|
|
|
src/ldblib.c
|
2011-08-08 15:19:44 -06:00
|
|
|
src/ldebug.c
|
|
|
|
src/ldo.c
|
|
|
|
src/ldump.c
|
|
|
|
src/lfunc.c
|
|
|
|
src/lgc.c
|
2011-08-13 16:09:59 -06:00
|
|
|
src/linit.c
|
|
|
|
src/liolib.c
|
2011-08-08 15:19:44 -06:00
|
|
|
src/llex.c
|
2011-08-13 16:09:59 -06:00
|
|
|
src/lmathlib.c
|
2011-08-08 15:19:44 -06:00
|
|
|
src/lmem.c
|
2011-08-13 16:09:59 -06:00
|
|
|
src/loadlib.c
|
2011-08-08 15:19:44 -06:00
|
|
|
src/lobject.c
|
|
|
|
src/lopcodes.c
|
2011-08-13 16:09:59 -06:00
|
|
|
src/loslib.c
|
2011-08-08 15:19:44 -06:00
|
|
|
src/lparser.c
|
|
|
|
src/lstate.c
|
|
|
|
src/lstring.c
|
2011-08-13 16:09:59 -06:00
|
|
|
src/lstrlib.c
|
2011-08-08 15:19:44 -06:00
|
|
|
src/ltable.c
|
2011-08-13 16:09:59 -06:00
|
|
|
src/ltablib.c
|
2011-08-08 15:19:44 -06:00
|
|
|
src/ltm.c
|
|
|
|
src/lundump.c
|
|
|
|
src/lvm.c
|
|
|
|
src/lzio.c
|
|
|
|
)
|
|
|
|
|
|
|
|
ADD_LIBRARY ( lua ${SRC_LIBLUA} )
|
|
|
|
TARGET_LINK_LIBRARIES ( lua ${LIBS})
|
|
|
|
|
|
|
|
#SET ( SRC_LUA src/lua.c )
|
|
|
|
#SET ( SRC_LUAC src/luac.c src/print.c )
|
|
|
|
|
|
|
|
#ADD_EXECUTABLE ( lua ${SRC_LUA} ${LUA_RC_FILE})
|
|
|
|
#ADD_EXECUTABLE ( luac ${SRC_LUAC} ${LUAC_RC_FILE})
|
|
|
|
#TARGET_LINK_LIBRARIES ( lua liblua )
|
|
|
|
#TARGET_LINK_LIBRARIES ( luac liblua_static )
|
|
|
|
|