1
- cmake_minimum_required (VERSION 3.20 )
2
- project (ltfs,
3
- # TODO: Find a better solution to mark this version as different from the official build
4
- VERSION "2.5.0.9999"
5
- )
1
+ cmake_minimum_required (VERSION 3.26 )
2
+ project (ltfs
3
+ LANGUAGES C)
4
+ list ( APPEND CMAKE_MODULE_PATH " ${CMAKE_CURRENT_SOURCE_DIR} /.cmake" )
5
+
6
6
include (CheckSymbolExists REQUIRED)
7
7
include (CheckTypeSize REQUIRED)
8
8
include (CheckLibraryExists REQUIRED)
9
9
include (CheckIncludeFiles REQUIRED)
10
10
include (GNUInstallDirs REQUIRED)
11
11
12
+ find_package (SNMP REQUIRED)
12
13
find_package (PkgConfig REQUIRED)
13
14
find_package (Threads REQUIRED)
14
15
find_package (ICU COMPONENTS uc)
15
16
find_package (LibXml2 REQUIRED)
16
17
18
+ check_type_size(time_t SIZEOF_TIME_T)
17
19
add_compile_definitions (_GNU_SOURCE __CMAKE_BUILD)
18
20
19
21
pkg_check_modules(FUSE REQUIRED "fuse>=2.6.0" IMPORTED_TARGET)
@@ -29,29 +31,3 @@ endif()
29
31
30
32
add_subdirectory (messages)
31
33
add_subdirectory (src)
32
-
33
- # TODO: Improve the use of SNMP, right now this flags are not added to the build.
34
- # TODO: Test the use of SNMP
35
- option (ENABLE_SNMP "Force to use ICU6x (unorm2) functions" OFF )
36
- if (ENABLE_SNMP)
37
- pkg_check_modules(SNMP REQUIRED "net-snmp>=5.3" IMPORTED_TARGET)
38
- find_program (NETSNMP_CONFIG_BIN net-snmp-config REQUIRED)
39
- if (NETSNMP_CONFIG_BIN)
40
- exec_program (${NETSNMP_CONFIG_BIN} ARGS --cflags OUTPUT_VARIABLE _NETSNMP_CFLAGS)
41
- exec_program (${NETSNMP_CONFIG_BIN} ARGS --libs OUTPUT_VARIABLE _NETSNMP_LIBS)
42
-
43
- string (REGEX REPLACE "[\"\r\n ]" " " _NETSNMP_CFLAGS "${_NETSNMP_CFLAGS} " )
44
- string (REGEX REPLACE "[\"\r\n ]" " " _NETSNMP_LIBS "${_NETSNMP_LIBS} " )
45
- set (NETSNMP_CFLAGS ${_NETSNMP_CFLAGS} CACHE STRING "CFLAGS for net-snmp lib" )
46
- set (NETSNMP_LIBS ${_NETSNMP_LIBS} CACHE STRING "linker options for net-snmp lib" )
47
- set (NETSNMP_FOUND TRUE CACHE BOOL "net-snmp is found" )
48
- else ()
49
- set (NETSNMP_FOUND FALSE CACHE BOOL "net-snmp is not found" )
50
- endif ()
51
- endif ()
52
-
53
-
54
- check_type_size(time_t SIZEOF_TIME_T)
55
- add_compile_definitions (
56
- SIZEOF_TIME_T=${SIZEOF_TIME_T}
57
- )
0 commit comments