blob: 737f0b20e52556a049d2be8cd87ba8a0f197d84e (
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
44
45
46
47
48
49
50
|
SET(sources
agent.c
sessionTable.c
sessionTable_data_access.c
sessionTable_data_get.c
sessionTable_data_set.c
sessionTable_interface.c
statCore.c
statL2TP.c
statPPP.c
statPPPOE.c
statPPTP.c
statIPOE.c
statSSTP.c
terminate.c
shutdown.c
exec_cli.c
)
find_library(SNMP_LIBRARY netsnmp
HINTS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
PATHS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
)
find_library(SNMPAGENT_LIBRARY netsnmpagent
HINTS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
PATHS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
)
find_library(SNMPHELPERS_LIBRARY netsnmphelpers
HINTS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
PATHS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
)
find_library(SNMPMIBS_LIBRARY netsnmpmibs
HINTS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
PATHS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib
)
IF(NOT SNMP_LIBRARY)
message(FATAL_ERROR "${Esc}[31mRequired snmp libraries not found.\n Install libsnmp-dev and run cmake again${Esc}[m")
ENDIF(NOT SNMP_LIBRARY)
ADD_LIBRARY(net-snmp SHARED ${sources})
TARGET_LINK_LIBRARIES(net-snmp ${SNMP_LIBRARY} ${SNMPAGENT_LIBRARY} ${SNMPHELPERS_LIBRARY} ${SNMPMIBS_LIBRARY})
INSTALL(TARGETS net-snmp
LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
|