summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe/CMakeLists.txt
blob: fdcb3a49ee4b275a3e406d0dd775fc7800965c00 (plain)
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
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

SET(sources
	ipoe.c
	dhcpv4.c
	dhcpv4_options.c
	ipoe_netlink.c
	backup.c
)

IF (LUA)
	include(FindLua51)
	IF (NOT LUA51_FOUND)
		MESSAGE(FATAL_ERROR "lua not found")
	ENDIF (NOT LUA51_FOUND)
	INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
	ADD_DEFINITIONS(-DUSE_LUA)
	SET(sources ${sources} lua.c lua_lpack.c)
ENDIF (LUA)

ADD_LIBRARY(ipoe SHARED ${sources})
IF (LUA)
	TARGET_LINK_LIBRARIES(ipoe ${LUA_LIBRARIES})
ENDIF(LUA)

INSTALL(TARGETS ipoe LIBRARY DESTINATION lib/accel-ppp)