diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-11-15 08:58:23 +0000 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-11-20 07:58:12 +0000 |
commit | 4eb89ea4dcad4c01664b5331745f4e9a38facbd2 (patch) | |
tree | f4c6935249f6461a03886ab89532e5563db1f75f /ctrl/libhicnctrl/src/CMakeLists.txt | |
parent | 40fde5ad542c30e59ac02639e29389085de89de5 (diff) |
[HICN-394] Add route commands add, list, del for the hicn-plugin
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Change-Id: I41641f6d27babaa1c413ecf2fe6eae0e499df97d
Diffstat (limited to 'ctrl/libhicnctrl/src/CMakeLists.txt')
-rw-r--r-- | ctrl/libhicnctrl/src/CMakeLists.txt | 61 |
1 files changed, 33 insertions, 28 deletions
diff --git a/ctrl/libhicnctrl/src/CMakeLists.txt b/ctrl/libhicnctrl/src/CMakeLists.txt index ea63217dd..14c204dda 100644 --- a/ctrl/libhicnctrl/src/CMakeLists.txt +++ b/ctrl/libhicnctrl/src/CMakeLists.txt @@ -26,11 +26,22 @@ set(UTIL_HEADER_FILES ) set(SOURCE_FILES - api.c face.c route.c ) +if(BUILD_CTRL_HICNPLUGIN) + set(SOURCE_FILES + ${SOURCE_FILES} + hicn_plugin_api.c + ) +else () + set(SOURCE_FILES + ${SOURCE_FILES} + api.c + ) +endif() + set(LIBRARIES m ${HICN_LIBRARIES} @@ -42,43 +53,37 @@ set(INCLUDE_DIRS ${HICN_INCLUDE_DIRS} ) +# Android requires static libraries if (${CMAKE_SYSTEM_NAME} STREQUAL "Android") - set(HICN_LIBRARIES ${LIBHICN_STATIC} log) - build_library(${LIBHICNCTRL} - STATIC - SOURCES ${SOURCE_FILES} - INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES} - LINK_LIBRARIES ${LIBRARIES} - DEPENDS ${LIBHICN_STATIC} - COMPONENT ${LIBHICNCTRL_COMPONENT} - DEPENDS ${LIBHICN_STATIC} - INCLUDE_DIRS ${INCLUDE_DIRS} - INSTALL_ROOT_DIR hicn - DEFINITIONS ${COMPILER_DEFINITIONS} - ) + set(LIBRARIES ${LIBRARIES} ${LIBHICN_STATIC}) + set(LINK_TYPE STATIC) else () - build_library(${LIBHICNCTRL} - SHARED STATIC - SOURCES ${SOURCE_FILES} - INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES} - LINK_LIBRARIES ${LIBRARIES} - DEPENDS ${LIBHICN_SHARED} - COMPONENT ${LIBHICNCTRL_COMPONENT} - DEPENDS ${LIBHICN_SHARED} - INCLUDE_DIRS ${INCLUDE_DIRS} - INSTALL_ROOT_DIR hicn - DEFINITIONS ${COMPILER_DEFINITIONS} - ) + set(LINK_TYPE SHARED STATIC) endif () +build_library(${LIBHICNCTRL} + ${LINK_TYPE} + SOURCES ${SOURCE_FILES} + INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES} + LINK_LIBRARIES ${LIBRARIES} + DEPENDS ${DEPENDENCIES} + COMPONENT ${LIBHICNCTRL_COMPONENT} + INCLUDE_DIRS ${INCLUDE_DIRS} + INSTALL_ROOT_DIR hicn + DEFINITIONS ${COMPILER_DEFINITIONS} +) + if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android" AND NOT COMPILE_FOR_IOS) + set(LIBRARIES ${LIBRARIES} ${LIBHICN_SHARED} ${LIBHICNCTRL_SHARED}) + list(APPEND DAEMON_SRC cli.c ) + build_executable(${HICNCTRL} SOURCES ${DAEMON_SRC} - LINK_LIBRARIES ${LIBHICNCTRL_SHARED} ${LIBHICN_SHARED} - DEPENDS ${LIBHICNCTRL_SHARED} ${LIBHICN_SHARED} + LINK_LIBRARIES ${LIBRARIES} + DEPENDS ${LIBHICNCTRL_SHARED} COMPONENT ${LIBHICNCTRL_COMPONENT} INCLUDE_DIRS ${INCLUDE_DIRS} DEFINITIONS ${COMPILER_DEFINITIONS} |