-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
49 lines (42 loc) · 1.54 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8.3)
project(L3ROAMD C)
INCLUDE(FindPkgConfig)
IF(NOT PKG_CONFIG_FOUND)
MESSAGE(FATAL_ERROR "Error: pkg-config not found on this system")
ENDIF(NOT PKG_CONFIG_FOUND)
MESSAGE(STATUS "")
MESSAGE(STATUS "Configuring libnl ...")
PKG_SEARCH_MODULE(LIBNL-TINY libnl-tiny)
IF(LIBNL-TINY_FOUND)
INCLUDE_DIRECTORIES(${LIBNL-TINY_INCLUDE_DIRS})
LINK_DIRECTORIES(${LIBNL-TINY_LIBRARY_DIRS})
SET(LIBNL_LIBRARIES ${LIBNL-TINY_LIBRARIES})
ELSE(LIBNL-TINY_FOUND)
PKG_SEARCH_MODULE(LIBNL libnl>=2.0 libnl-2.0 libnl-2)
IF(LIBNL_FOUND)
INCLUDE_DIRECTORIES(${LIBNL_INCLUDE_DIRS})
LINK_DIRECTORIES(${LIBNL_LIB_DIRS})
LIST(APPEND LIBNL_LIBRARIES
nl-genl
)
ELSE(LIBNL_FOUND)
PKG_SEARCH_MODULE(LIBNL3 libnl-3 libnl-3.0 libnl-3.1)
IF(LIBNL3_FOUND)
INCLUDE_DIRECTORIES(${LIBNL3_INCLUDE_DIRS})
LINK_DIRECTORIES(${LIBNL3_LIB_DIRS})
SET(LIBNL_LIBRARIES ${LIBNL3_LIBRARIES})
#############################################################
MESSAGE(STATUS "")
MESSAGE(STATUS "Configuring libnl-genl ...")
PKG_SEARCH_MODULE(LIBNL_GENL libnl-genl>=2.0 libnl-genl-3 libnl-genl-3.0 libnl-genl-3.1)
IF(LIBNL_GENL_FOUND)
INCLUDE_DIRECTORIES(${LIBNL_GENL_INCLUDE_DIRS})
LINK_DIRECTORIES(${LIBNL_GENL_LIB_DIRS})
ENDIF(LIBNL_GENL_FOUND)
ELSE(LIBNL3_FOUND)
MESSAGE(FATAL_ERROR "Error: libnl and libnl-genl not found")
ENDIF(LIBNL3_FOUND)
ENDIF(LIBNL_FOUND)
ENDIF(LIBNL-TINY_FOUND)
set(CMAKE_MODULE_PATH ${L3ROAMD_SOURCE_DIR})
add_subdirectory(src)