summaryrefslogtreecommitdiff
path: root/accel-pppd/logs/CMakeLists.txt
blob: b25cbe26602e711088df39278fc4a876ad6602e4 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
IF(NOT DEFINED LOG_FILE)
	SET(LOG_FILE TRUE)
ENDIF(NOT DEFINED LOG_FILE)

IF(NOT DEFINED LOG_TCP)
	SET(LOG_TCP TRUE)
ENDIF(NOT DEFINED LOG_TCP)

IF(NOT DEFINED LOG_SYSLOG)
	SET(LOG_SYSLOG TRUE)
ENDIF(NOT DEFINED LOG_SYSLOG)


IF(LOG_FILE)
	ADD_LIBRARY(log_file SHARED log_file.c)
	TARGET_LINK_LIBRARIES(log_file rt)
	INSTALL(TARGETS log_file
		LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
	)
ENDIF(LOG_FILE)

IF(LOG_TCP)
	ADD_LIBRARY(log_tcp SHARED log_tcp.c)
	INSTALL(TARGETS log_tcp
		LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
	)
ENDIF(LOG_TCP)

IF(LOG_SYSLOG)
	ADD_LIBRARY(log_syslog SHARED log_syslog.c)
	INSTALL(TARGETS log_syslog
		LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
	)
ENDIF(LOG_SYSLOG)

IF(LOG_PGSQL)
	ADD_LIBRARY(log_pgsql SHARED log_pgsql.c)
	TARGET_LINK_LIBRARIES(log_pgsql pq)
	INSTALL(TARGETS log_pgsql
		LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
	)
ENDIF(LOG_PGSQL)