blob: 29b76da25fe9ecd3a6ebb41a0a4d3d6525814cfc (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Define a few configuration variables that we want accessible in the software
include(BuildMacros)
configure_file(config.h.in hicn-light/config.h @ONLY)
if(UNIX AND NOT APPLE)
set(LINUX TRUE)
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND ENABLE_PUNTING)
list(APPEND COMPILER_DEFINITIONS
"-DPUNTING"
)
endif()
list(APPEND COMPILER_DEFINITIONS
# "-DWITH_GRO"
# "-DWITH_GSO"
# "-DWITH_ZEROCOPY"
"-DWITH_MAPME"
"-DWITH_POLICY" # XXX Requires WITH_MAPME... enforce
"-DWITH_PREFIX_STATS"
"-DWITH_CLI"
# "-DNDEBUG=1" # disable assertions
)
if (LINUX)
list(APPEND COMPILER_DEFINITIONS
"-D_GNU_SOURCE" # batching support through struct mmsghdr
)
endif()
if (NOT DISABLE_EXECUTABLES)
add_subdirectory(command_line)
endif()
add_subdirectory(base)
add_subdirectory(config)
add_subdirectory(content_store)
add_subdirectory(core)
add_subdirectory(io)
add_subdirectory(platforms)
add_subdirectory(socket)
add_subdirectory(strategies)
add_subdirectory(utils)
list(APPEND HEADER_FILES
${CMAKE_CURRENT_BINARY_DIR}/hicn-light/config.h
)
list(INSERT HICN_LIGHT_INCLUDE_DIRS 0
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}/..
)
list(APPEND TO_INSTALL_HEADER_FILES
${CMAKE_CURRENT_BINARY_DIR}/hicn-light/config.h
)
if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set(LIB_BUILD_TYPE "NO_DEV")
else()
set(LIB_BUILD_TYPE "")
endif()
build_library(${LIBHICN_LIGHT}
STATIC ${LIB_BUILD_TYPE}
SOURCES ${SOURCE_FILES}
INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES}
LINK_LIBRARIES ${LIBRARIES}
DEPENDS ${DEPENDENCIES}
COMPONENT ${HICN_LIGHT}
INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS}
INSTALL_ROOT_DIR hicn
DEFINITIONS ${COMPILER_DEFINITIONS}
)
|