Skip to content

Commit 00555ee

Browse files
committed
build: add cmake
fix: CMake definition for cmake specific files feat: add cmake lists to drivers and kmi fix: revert unnecesary changes fix: missing .c file fix: typos and names chore: add build specific version number and add comments feat: add last cmakelists fix: fix compilation issues feat: fix names feat: add manpages feat: cmake working
1 parent adb3722 commit 00555ee

File tree

22 files changed

+939
-3
lines changed

22 files changed

+939
-3
lines changed

.cmake/FindSNMP.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# TODO: Improve the use of SNMP, right now this flags are not added to the build.
2+
# TODO: Test the use of SNMP
3+
option(ENABLE_SNMP "Force to use ICU6x (unorm2) functions" OFF)
4+
if(ENABLE_SNMP)
5+
pkg_check_modules(SNMP REQUIRED "net-snmp>=5.3" IMPORTED_TARGET)
6+
find_program(NETSNMP_CONFIG_BIN net-snmp-config REQUIRED)
7+
if(NETSNMP_CONFIG_BIN)
8+
exec_program(${NETSNMP_CONFIG_BIN} ARGS --cflags OUTPUT_VARIABLE _NETSNMP_CFLAGS)
9+
exec_program(${NETSNMP_CONFIG_BIN} ARGS --libs OUTPUT_VARIABLE _NETSNMP_LIBS)
10+
11+
string(REGEX REPLACE "[\"\r\n]" " " _NETSNMP_CFLAGS "${_NETSNMP_CFLAGS}")
12+
string(REGEX REPLACE "[\"\r\n]" " " _NETSNMP_LIBS "${_NETSNMP_LIBS}")
13+
set(NETSNMP_CFLAGS ${_NETSNMP_CFLAGS} CACHE STRING "CFLAGS for net-snmp lib")
14+
set(NETSNMP_LIBS ${_NETSNMP_LIBS} CACHE STRING "linker options for net-snmp lib")
15+
set(NETSNMP_FOUND TRUE CACHE BOOL "net-snmp is found")
16+
else()
17+
set (NETSNMP_FOUND FALSE CACHE BOOL "net-snmp is not found")
18+
endif()
19+
endif()

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Files generated by cmake
2+
__cmake_systeminformation
3+
.cache
4+
15
# Files generated by ./autogen.sh
26
Makefile.in
37
aclocal.m4

0 commit comments

Comments
 (0)