- added support for checking if LuaJit library is installed and use that instead of normal Lua for increased lua performance (Currently only implemented in gcc builds)

This commit is contained in:
Mark Vejvoda
2012-04-26 16:17:12 +00:00
parent 2a1ee15a54
commit 1352f42854
3 changed files with 57 additions and 8 deletions

View File

@@ -109,11 +109,24 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
# SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${VORBIS_FILE_LIBRARY})
# ENDIF()
FIND_PACKAGE(LUA REQUIRED)
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
IF(UNIX)
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUA_LIBRARIES})
ENDIF()
FIND_PACKAGE(LUAJIT)
IF(LUAJIT_FOUND)
MESSAGE(STATUS "**NOTE: LUAJIT found and will grealy improve Lua performance.")
INCLUDE_DIRECTORIES(${LUAJIT_INCLUDE_DIR})
IF(UNIX)
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUAJIT_LIBRARIES})
ENDIF()
ELSE()
MESSAGE(STATUS "**WARNING: LUAJIT NOT found and will grealy affect Lua performance.")
FIND_PACKAGE(LUA REQUIRED)
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
IF(UNIX)
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${LUA_LIBRARIES})
ENDIF()
ENDIF()
OPTION(WANT_STATIC_LIBS "builds as many static libs as possible" OFF)