File: Find_lua.cmake

package info (click to toggle)
crtmpserver 1.0~dfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,372 kB
  • ctags: 7,905
  • sloc: cpp: 56,355; sh: 411; makefile: 21
file content (59 lines) | stat: -rw-r--r-- 1,792 bytes parent folder | download | duplicates (4)
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
MESSAGE(STATUS "Looking for lua")
FIND_PATH(LUA_INCLUDE_PATH_ 
	NAMES
		lualib.h
	PATHS
		/usr/include/lua5.1
		/usr/include
		/usr/local/include
		/usr/local/include/lua51
		/sw/include
		/opt/local/include
		NO_DEFAULT_PATH)

FIND_LIBRARY(LUA_LIBRARY_PATH_
	NAMES
		lua5.1
	PATHS
		/usr/lib64
		/usr/lib
		/usr/local/lib64
		/usr/local/lib
		/usr/local/lib64/lua51
		/usr/local/lib/lua51
		/sw/lib
		/opt/local/lib
		)

IF(LUA_INCLUDE_PATH_)
	SET(LUA_FOUND 1)
	SET(LUA_INCLUDE_PATH "${LUA_INCLUDE_PATH_}")
	MESSAGE(STATUS "Looking for lua headers - found")
ELSE(LUA_INCLUDE_PATH_)
	SET(LUA_FOUND 0)
	SET(LUA_INCLUDE_PATH "${CRTMPSERVER_3RDPARTY_ROOT}/lua-dev")
	MESSAGE(STATUS "Looking for lua headers - not found. Defaulting to ${CRTMPSERVER_3RDPARTY_ROOT}/lua-dev")
ENDIF(LUA_INCLUDE_PATH_)

IF(LUA_FOUND)
	IF(LUA_LIBRARY_PATH_)
		SET(LUA_LIBRARY_PATH "${LUA_LIBRARY_PATH_}")
		SET(LUA_FOUND 1 CACHE STRING "Set to 1 if lua is found, 0 otherwise")
		MESSAGE(STATUS "Looking for lua library - found")
	ELSE(LUA_LIBRARY_PATH_)
		SET(LUA_FOUND 0 CACHE STRING "Set to 1 if lua is found, 0 otherwise")
		SET(LUA_LIBRARY_PATH "lua")
		SET(LUA_INCLUDE_PATH "${CRTMPSERVER_3RDPARTY_ROOT}/lua-dev")
		MESSAGE(STATUS "Looking for lua library - not found. Lua library will be compiled from ${CRTMPSERVER_3RDPARTY_ROOT}/lua-dev")
	ENDIF(LUA_LIBRARY_PATH_)
ELSE(LUA_FOUND)
	SET(LUA_FOUND 0 CACHE STRING "Set to 1 if lua is found, 0 otherwise")
	SET(LUA_LIBRARY_PATH "lua")
	MESSAGE(STATUS "Looking for lua library - not found. Lua library will be compiled from ${CRTMPSERVER_3RDPARTY_ROOT}/lua-dev")
ENDIF(LUA_FOUND)

#MESSAGE("final LUA_FOUND: ${LUA_FOUND}")
#MESSAGE("final LUA_INCLUDE_PATH: ${LUA_INCLUDE_PATH}")
#MESSAGE("final LUA_LIBRARY_PATH: ${LUA_LIBRARY_PATH}")
MARK_AS_ADVANCED(LUA_FOUND)