mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
zlib in cmake modules
This commit is contained in:
22
cmake/FindLua.cmake
Normal file
22
cmake/FindLua.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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)
|
||||
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(Lua51 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR)
|
||||
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
|
||||
|
Reference in New Issue
Block a user