2012-07-30 08:15:37 +02:00
|
|
|
# Try to find the lua library
|
2012-05-13 14:15:30 +02:00
|
|
|
# LUAJIT_FOUND - system has lua
|
|
|
|
# LUAJIT_INCLUDE_DIR - the lua include directory
|
|
|
|
# LUAJIT_LIBRARY - the lua library
|
|
|
|
# LUAJIT_LIBRARIES - the lua library and it's dependencies
|
2012-04-16 15:57:24 +02:00
|
|
|
|
2012-05-13 14:15:30 +02:00
|
|
|
FIND_PATH(LUAJIT_INCLUDE_DIR NAMES lua.h PATH_SUFFIXES luajit-2.0)
|
2012-06-22 21:04:03 +02:00
|
|
|
SET(_LUAJIT_STATIC_LIBS libluajit51.a libluajit5.1.a libluajit-5.1.a libluajit.a)
|
2012-08-18 19:08:05 +02:00
|
|
|
SET(_LUAJIT_SHARED_LIBS libluajit51.dll.a libluajit5.1.dll.a libluajit-5.1.dll.a libluajit.dll.a luajit51 luajit5.1 luajit-5.1 luajit)
|
2012-06-22 21:04:03 +02:00
|
|
|
IF(USE_STATIC_LIBS)
|
|
|
|
FIND_LIBRARY(LUAJIT_LIBRARY NAMES ${_LUAJIT_STATIC_LIBS} ${_LUAJIT_SHARED_LIBS})
|
|
|
|
ELSE()
|
|
|
|
FIND_LIBRARY(LUAJIT_LIBRARY NAMES ${_LUAJIT_SHARED_LIBS} ${_LUAJIT_STATIC_LIBS})
|
|
|
|
ENDIF()
|
2012-04-16 15:57:24 +02:00
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
2012-06-22 21:04:03 +02:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LuaJIT DEFAULT_MSG LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
|
|
|
|
MARK_AS_ADVANCED(LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
|