2924
|
1 |
# Find the Lua library
|
|
2 |
#
|
|
3 |
|
3134
|
4 |
IF(WIN32)
|
|
5 |
SET(LUA_DEFAULT lua.dll)
|
|
6 |
ELSE(WIN32)
|
|
7 |
IF(APPLE)
|
|
8 |
SET(LUA_DEFAULT lua)
|
|
9 |
ELSE(APPLE)
|
|
10 |
#locate the system's lua library
|
|
11 |
FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib)
|
|
12 |
IF(${LUA_DEFAULT} MATCHES "LUA_DEFAULT-NOTFOUND")
|
3145
|
13 |
#UNSET(LUA_DEFAULT)
|
3134
|
14 |
MESSAGE(FATAL_ERROR "Couldn't find Lua 5.1 library!")
|
|
15 |
ENDIF()
|
|
16 |
#remove the path (fpc doesn't like it - why?)
|
|
17 |
GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME)
|
|
18 |
ENDIF(APPLE)
|
|
19 |
ENDIF(WIN32)
|
|
20 |
SET(LUA_LIBRARY ${LUA_DEFAULT} CACHE STRING "Lua library to link to; file name without path only!")
|
3145
|
21 |
#UNSET(LUA_DEFAULT)
|