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