You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
844 B
23 lines
844 B
# Try to find the lua librairy
|
|
# LUA_FOUND - system has lua
|
|
# LUA_INCLUDE_DIR - the lua include directory
|
|
# LUA_LIBRARY - the lua library
|
|
# LUA_LIBRARIES - the lua library and it's dependencies
|
|
|
|
FIND_PATH(LUA_INCLUDE_DIR NAMES lua.h PATH_SUFFIXES luajit-2.0)
|
|
FIND_LIBRARY(LUA_LIBRARY NAMES libluajit51.a libluajit5.1.a libluajit-5.1.a libluajit.a luajit51 luajit5.1 luajit-5.1 luajit)
|
|
|
|
IF(LUA_LIBRARY)
|
|
IF(UNIX AND NOT APPLE)
|
|
FIND_LIBRARY(LUA_MATH_LIBRARY m)
|
|
SET(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
|
|
ELSE(UNIX AND NOT APPLE)
|
|
SET(LUA_LIBRARIES "${LUA_LIBRARY}")
|
|
ENDIF(UNIX AND NOT APPLE)
|
|
ENDIF(LUA_LIBRARY)
|
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR)
|
|
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
|
|
|