cmake option to use luajit

This commit is contained in:
Eduardo Bart
2012-04-16 10:57:24 -03:00
parent 1d558bc412
commit a4a00a49fe
4 changed files with 37 additions and 5 deletions

View File

@@ -10,6 +10,8 @@ OPTION(USE_OPENGL_ES2 "Use OpenGL ES 2.0 (for mobiles devices)" OFF)
OPTION(CRASH_HANDLER "Generate crash reports" ON)
SET(BUILD_REVISION "custom" CACHE "Git revision string (intended for releases)" STRING)
OPTION(LUAJIT "Use lua jit" OFF)
# set debug as default build type
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo)
@@ -36,7 +38,12 @@ ELSE()
SET(OPENGL_LIBRARIES ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
ENDIF()
FIND_PACKAGE(Lua REQUIRED)
IF(LUAJIT)
FIND_PACKAGE(LuaJIT REQUIRED)
ELSE()
FIND_PACKAGE(Lua REQUIRED)
ENDIF()
FIND_PACKAGE(PhysFS REQUIRED)
FIND_PACKAGE(GMP REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)