Use LuaJIT on all platforms if available
parent
b10d6b04c4
commit
b705597b9d
|
@ -46,7 +46,8 @@ install:
|
|||
- vcpkg install libpng:x86-windows
|
||||
- vcpkg install gettext:x86-windows
|
||||
- vcpkg install libjpeg-turbo:x86-windows
|
||||
- vcpkg install lua:x86-windows
|
||||
- vcpkg remove lua:x86-windows
|
||||
- vcpkg install luajit:x86-windows
|
||||
- vcpkg install fmt:x86-windows
|
||||
- vcpkg install glew:x86-windows
|
||||
- vcpkg install eigen3:x86-windows
|
||||
|
|
|
@ -14,14 +14,14 @@ os:
|
|||
- osx
|
||||
|
||||
env:
|
||||
- LUA=5.1
|
||||
- LUA=jit-5.1
|
||||
- LUA=5.2
|
||||
- LUA=5.3
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- os: osx
|
||||
env: LUA=5.1
|
||||
env: LUA=jit-5.1
|
||||
- os: osx
|
||||
env: LUA=5.2
|
||||
allow_failures:
|
||||
|
|
|
@ -167,31 +167,13 @@ link_libraries(${JPEG_LIBRARIES})
|
|||
if(ENABLE_CELX)
|
||||
add_definitions(-DCELX)
|
||||
|
||||
find_package(Lua)
|
||||
if(LUA_FOUND)
|
||||
add_definitions(-DLUA_VER=0x0${LUA_VERSION_MAJOR}0${LUA_VERSION_MINOR}00)
|
||||
include_directories(${LUA_INCLUDE_DIR})
|
||||
link_libraries(${LUA_LIBRARIES})
|
||||
else()
|
||||
if(_UNIX)
|
||||
pkg_search_module(LUA luajit lua5.3 lua5.2 lua5.1 REQUIRED)
|
||||
include_directories(${LUA_INCLUDE_DIRS})
|
||||
link_libraries(${LUA_LIBRARIES})
|
||||
|
||||
if(LUA_VERSION VERSION_EQUAL "5.3" OR LUA_VERSION VERSION_GREATER "5.3")
|
||||
set(LUA_VER 0x050300)
|
||||
elseif(LUA_VERSION VERSION_EQUAL "5.2" OR LUA_VERSION VERSION_GREATER "5.2")
|
||||
set(LUA_VER 0x050200)
|
||||
elseif(LUA_VERSION VERSION_EQUAL "5.1" OR LUA_VERSION VERSION_GREATER "5.1")
|
||||
set(LUA_VER 0x050100)
|
||||
else() # luajit
|
||||
set(LUA_VER 0x050100)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "LUA >= 5.1 was not found")
|
||||
endif()
|
||||
add_definitions(-DLUA_VER=${LUA_VER})
|
||||
find_package(LuaJIT)
|
||||
if(NOT LUAJIT_FOUND)
|
||||
find_package(Lua REQUIRED)
|
||||
endif()
|
||||
add_definitions(-DLUA_VER=0x0${LUA_VERSION_MAJOR}0${LUA_VERSION_MINOR}00)
|
||||
include_directories(${LUA_INCLUDE_DIR})
|
||||
link_libraries(${LUA_LIBRARIES})
|
||||
endif()
|
||||
|
||||
#[[
|
||||
|
|
Loading…
Reference in New Issue