diff options
author | Mauro <you@example.com> | 2021-06-30 07:57:22 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2021-07-06 16:16:04 +0000 |
commit | 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch) | |
tree | 7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /ctrl/libhicnctrl/src/CMakeLists.txt | |
parent | 147ba39bed26887f5eba84757e2463ab8e370a9a (diff) |
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org>
Co-authored-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Olivier Roques <oroques+fdio@cisco.com>
Co-authored-by: Giulio Grassi <gigrassi@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'ctrl/libhicnctrl/src/CMakeLists.txt')
-rw-r--r-- | ctrl/libhicnctrl/src/CMakeLists.txt | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/ctrl/libhicnctrl/src/CMakeLists.txt b/ctrl/libhicnctrl/src/CMakeLists.txt index f5d3c49a3..f9934d70e 100644 --- a/ctrl/libhicnctrl/src/CMakeLists.txt +++ b/ctrl/libhicnctrl/src/CMakeLists.txt @@ -15,41 +15,25 @@ list(APPEND COMPILER_DEFINITIONS "-DWITH_POLICY" ) -set(HEADER_FILES - api.h - commands.h - face.h -) - -set(UTIL_HEADER_FILES - face.h -) - set(SOURCE_FILES face.c route.c + api.c ) -if(BUILD_HICNPLUGIN) - set(SOURCE_FILES - ${SOURCE_FILES} - hicn_plugin_api.c - ) -else () - set(SOURCE_FILES - ${SOURCE_FILES} - api.c - ) -endif() +set(HEADER_FILES + api_private.h +) set(LIBRARIES m + dl ${HICN_LIBRARIES} ) set(INCLUDE_DIRS - ./ - ../includes/ + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../includes/ ${HICN_INCLUDE_DIRS} ) @@ -61,9 +45,17 @@ else () set(LINK_TYPE SHARED STATIC) endif () +if (${CMAKE_SYSTEM_NAME} MATCHES Android) + list(APPEND SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/modules/hicn_light_api.c + ) +else() + add_subdirectory(modules) +endif() + build_library(${LIBHICNCTRL} ${LINK_TYPE} - SOURCES ${SOURCE_FILES} + SOURCES ${SOURCE_FILES} ${HEADER_FILES} INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES} LINK_LIBRARIES ${LIBRARIES} DEPENDS ${DEPENDENCIES} @@ -74,7 +66,13 @@ build_library(${LIBHICNCTRL} ) if (NOT DISABLE_EXECUTABLES) - set(LIBRARIES ${LIBRARIES} ${LIBHICN_SHARED} ${LIBHICNCTRL_SHARED}) + if (DISABLE_SHARED_LIBRARIES) + set(LIBRARIES ${LIBRARIES} ${LIBHICNCTRL_STATIC}) + set(DEPENDENCIES ${LIBHICNCTRL_STATIC}) + else () + set(LIBRARIES ${LIBRARIES} ${LIBHICN_SHARED} ${LIBHICNCTRL_SHARED}) + set(DEPENDENCIES ${LIBHICNCTRL_SHARED}) + endif () list(APPEND DAEMON_SRC cli.c @@ -83,7 +81,7 @@ if (NOT DISABLE_EXECUTABLES) build_executable(${HICNCTRL} SOURCES ${DAEMON_SRC} LINK_LIBRARIES ${LIBRARIES} - DEPENDS ${LIBHICNCTRL_SHARED} + DEPENDS ${DEPENDENCIES} COMPONENT ${LIBHICNCTRL_COMPONENT} INCLUDE_DIRS ${INCLUDE_DIRS} DEFINITIONS ${COMPILER_DEFINITIONS} |