aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/CMakeLists.txt
blob: 68ef851f1f3ad1c0bbbfcd0345dfd10d66f88653 (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
# Define a few configuration variables that we want accessible in the software

include(BuildMacros)
configure_file(config.h.in config.h @ONLY)

if(NOT ANDROID_API AND NOT COMPILE_FOR_IOS)
  add_subdirectory(command_line)
endif ()

add_subdirectory(config)
add_subdirectory(content_store)
add_subdirectory(core)
add_subdirectory(io)
add_subdirectory(messenger)
add_subdirectory(platforms)
add_subdirectory(processor)
add_subdirectory(socket)
add_subdirectory(strategies)
add_subdirectory(utils)

list(APPEND HEADER_FILES
  ${CMAKE_CURRENT_BINARY_DIR}/config.h
)

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND ENABLE_PUNTING)
  list(APPEND COMPILER_DEFINITIONS
    "-DPUNTING"
  )
endif()

list(APPEND COMPILER_DEFINITIONS
  "-DWITH_MAPME -DWITH_MAPME_FIXES"
)

list(INSERT HICN_LIGHT_INCLUDE_DIRS 0
  ${CMAKE_CURRENT_SOURCE_DIR}/..
)

if (INSTALL_HEADER)
  set(TO_INSTALL_HEADERS ${HEADER_FILES})
endif()

build_library(${LIBHICN_LIGHT}
  STATIC
  SOURCES ${SOURCE_FILES}
  INSTALL_HEADERS ${TO_INSTALL_HEADERS}
  LINK_LIBRARIES ${LIBRARIES}
  DEPENDS ${DEPENDENCIES}
  COMPONENT ${LIBHICN_LIGHT}
  INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS}
  INSTALL_ROOT_DIR hicn/hicn-light
  DEFINITIONS ${COMPILER_DEFINITIONS}
)