tibia-client/cmake/FindLua.cmake

23 lines
819 B
CMake
Raw Normal View History

2011-05-15 23:12:39 +02:00
# 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 lua51 lua5.1)
FIND_LIBRARY(LUA_LIBRARY NAMES liblua51.a liblua5.1.a liblua-5.1.a liblua.a lua51 lua5.1 lua-5.1 lua)
IF(LUA_LIBRARY)
IF(UNIX AND NOT APPLE)
FIND_LIBRARY(LUA_MATH_LIBRARY m)
2011-05-16 05:26:04 +02:00
SET(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}")
2011-05-15 23:12:39 +02:00
ELSE(UNIX AND NOT APPLE)
SET(LUA_LIBRARIES "${LUA_LIBRARY}")
ENDIF(UNIX AND NOT APPLE)
ENDIF(LUA_LIBRARY)
INCLUDE(FindPackageHandleStandardArgs)
2011-05-16 05:26:04 +02:00
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR)
2011-05-15 23:12:39 +02:00
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)