-
Notifications
You must be signed in to change notification settings - Fork 64
/
lua-config.cmake.in
61 lines (46 loc) · 1.07 KB
/
lua-config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
find_path(LUA_INCLUDE_DIR lua.h
PATHS
@CMAKE_INSTALL_PREFIX@/include/ravi
)
find_library(LUA_LIBRARIES
NAMES @LIBRAVI_NAME@ @[email protected] @[email protected]
PATHS
@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
)
find_program(LUA_EXE
NAMES ravi_s
PATHS
@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@
)
# LUA_INCDIR - place where lua headers exist
set(LUA_INCDIR ${LUA_INCLUDE_DIR})
# LIBDIR - LUA_CPATH
if (WIN32)
get_filename_component(LIBDIR
${LUA_EXE}
DIRECTORY)
else()
get_filename_component(LIBDIR
${LUA_LIBRARIES}
DIRECTORY)
endif()
get_filename_component(LUA_BINDIR
${LUA_EXE}
DIRECTORY)
# LUA_LIBDIR - place where lua native libraries exist
get_filename_component(LUA_LIBDIR
${LUA_LIBRARIES}
DIRECTORY
)
if (NOT WIN32)
set(LUA_LIBRARIES "${LUA_LIBRARIES};m")
endif()
# LUALIB - the lua library to link against
set(LUALIB ${LUA_LIBRARIES})
# LUADIR - LUA_PATH
if (USE_LUA53)
set(LUADIR "${LUA_LIBDIR}/../share/lua/5.3")
else()
set(LUADIR "${LUA_LIBDIR}/../share/lua/5.3")
endif()
set(LUA "${LUA_EXE}")