diff options
author | 2019-02-22 18:09:48 +0100 | |
---|---|---|
committer | 2019-02-22 17:32:52 +0000 | |
commit | bb428fc90f2623bdf35c53e62bf2aaeba2d1e0b7 (patch) | |
tree | 2994228aff181f0e8adde36a77f0b2287d13cbc2 /hicn-light/src/CMakeLists.txt | |
parent | fccece7f012c209f04d9f9be4a10073536091914 (diff) |
[HICN-83] Added cmake flag "-DENABLE_PUNTING=[ON|OFF]" for enabling/disabling punting in hicnLightDaemon.
Change-Id: I14f5e1ce21f2c2381359fa6184671d3cbe43b808
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-light/src/CMakeLists.txt')
-rw-r--r-- | hicn-light/src/CMakeLists.txt | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/hicn-light/src/CMakeLists.txt b/hicn-light/src/CMakeLists.txt index 1951d00f7..851b961c7 100644 --- a/hicn-light/src/CMakeLists.txt +++ b/hicn-light/src/CMakeLists.txt @@ -4,7 +4,7 @@ include(BuildMacros) configure_file(config.h.in config.h @ONLY) if(NOT ANDROID_API AND NOT COMPILE_FOR_IOS) - add_subdirectory(command_line) + add_subdirectory(command_line) endif () add_subdirectory(config) @@ -19,27 +19,35 @@ add_subdirectory(strategies) add_subdirectory(utils) list(APPEND HEADER_FILES - ${CMAKE_CURRENT_BINARY_DIR}/config.h + ${CMAKE_CURRENT_BINARY_DIR}/config.h ) -set(COMPILER_DEFINITIONS "-DWITH_MAPME -DWITH_MAPME_FIXES") +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(APPEND HICN_LIGHT_INCLUDE_DIRS - ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_CURRENT_SOURCE_DIR}/.. ) if (INSTALL_HEADER) - set(TO_INSTALL_HEADERS ${HEADER_FILES}) + 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} + 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} ) |