diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-09-24 13:28:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-09-24 13:28:37 +0000 |
commit | 7452ef6cb7be56a054f4bed2d1846ba874ab717c (patch) | |
tree | 2fe4f9f0a7f41909095caaf8c22b9b9b058b8a93 /libtransport | |
parent | 70a51ce9c175019f8394f523100a3c7066d3a4bc (diff) | |
parent | a0da41b243661a039481d2c254d7db8f55f18d2b (diff) |
Merge "[HICN-279] Added libmemif packaging."
Diffstat (limited to 'libtransport')
-rw-r--r-- | libtransport/CMakeLists.txt | 47 | ||||
-rw-r--r-- | libtransport/cmake/Modules/Packaging.cmake | 8 |
2 files changed, 35 insertions, 20 deletions
diff --git a/libtransport/CMakeLists.txt b/libtransport/CMakeLists.txt index fb059e390..68e9efe77 100644 --- a/libtransport/CMakeLists.txt +++ b/libtransport/CMakeLists.txt @@ -25,7 +25,7 @@ include(DefaultConfiguration) include(BuildMacros) if (NOT CMAKE_BUILD_TYPE) - message(STATUS "No build type selected, default to Release") + message(STATUS "${PROJECT_NAME}: No build type selected, default to Release") set(CMAKE_BUILD_TYPE "Release") endif () @@ -58,15 +58,9 @@ set(INSTALL_INCLUDE_DIR include/hicn/transport) if ((BUILD_HICNPLUGIN OR BUILD_MEMIF_CONNECTOR) AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(__vpp__ 1) find_package(Vpp REQUIRED) - find_package(Libmemif REQUIRED) + list(APPEND LIBTRANSPORT_INTERNAL_INCLUDE_DIRS ${VPP_INCLUDE_DIRS} - ${LIBMEMIF_INCLUDE_DIRS} - ) - - list(APPEND LIBRARIES - # ${VPP_INCLUDE_DIRS} - ${LIBMEMIF_LIBRARIES} ) endif () @@ -76,33 +70,54 @@ find_package_wrapper(Libparc REQUIRED) find_package_wrapper(Asio REQUIRED) if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) - find_package_wrapper(Libhicn REQUIRED) if (__vpp__) find_package_wrapper(HicnBinaryApi REQUIRED) + find_package(Libmemif REQUIRED) + + list(APPEND LIBRARIES + ${LIBMEMIF_LIBRARIES} + ) endif() + + find_package_wrapper(Libhicn REQUIRED) + set(LIBTRANSPORT hicntransport) set(LIBTRANSPORT_SHARED ${LIBTRANSPORT}.shared) set(LIBTRANSPORT_STATIC ${LIBTRANSPORT}.static) else() - if (ANDROID_API) + if(ANDROID_API) set(HICN_LIBRARIES ${LIBHICN_STATIC}) list(APPEND DEPENDENCIES ${LIBHICN_STATIC} ) - else () + else() set(HICN_LIBRARIES ${LIBHICN_SHARED}) list(APPEND DEPENDENCIES ${LIBHICN_SHARED} ) - endif () - if (__vpp__) - list(APPEND DEPENDENCIES - hicn_plugin - ) + if (__vpp__) + list(APPEND DEPENDENCIES + hicn_plugin + ) + + if (NOT Libmemif_FOUND) + list(APPEND DEPENDENCIES + ${LIBMEMIF_SHARED} + ) + + list(APPEND LIBRARIES + ${LIBMEMIF_SHARED} + ) + endif() + endif() endif() endif() +list(APPEND LIBTRANSPORT_INTERNAL_INCLUDE_DIRS + ${LIBMEMIF_INCLUDE_DIRS} +) + include(Packaging) find_package(Threads REQUIRED) diff --git a/libtransport/cmake/Modules/Packaging.cmake b/libtransport/cmake/Modules/Packaging.cmake index c7ba3d06d..bd6bfc11a 100644 --- a/libtransport/cmake/Modules/Packaging.cmake +++ b/libtransport/cmake/Modules/Packaging.cmake @@ -32,22 +32,22 @@ set(lib${LIBTRANSPORT}-devel_DESCRIPTION ${lib${LIBTRANSPORT}_DESCRIPTION} if ((BUILD_MEMIF_CONNECTOR OR BUILD_HICNPLUGIN) AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(lib${LIBTRANSPORT}_DEB_DEPENDENCIES - "lib${LIBHICN} (>= stable_version), libparc (>= 1.0), vpp (>= stable_version-release), vpp (<< next_version-release)" + "lib${LIBHICN} (>= stable_version), libparc (>= 1.0), libmemif (>= stable_version), vpp (>= stable_version-release), vpp (<< next_version-release)" CACHE STRING "Dependencies for deb/rpm package." ) set(lib${LIBTRANSPORT}_RPM_DEPENDENCIES - "lib${LIBHICN} >= stable_version, libparc >= 1.0, vpp >= stable_version-release, vpp < next_version-release" + "lib${LIBHICN} >= stable_version, libparc >= 1.0, libmemif >= stable_version, vpp >= stable_version-release, vpp < next_version-release" CACHE STRING "Dependencies for deb/rpm package." ) set(lib${LIBTRANSPORT}-dev_DEB_DEPENDENCIES - "lib${LIBTRANSPORT} (>= stable_version), libasio-dev (>= 1.10), libhicn-dev (>= stable_version), libparc-dev (>= 1.0), vpp-dev (>= stable_version-release), vpp-dev (<< next_version-release)" + "lib${LIBTRANSPORT} (>= stable_version), libasio-dev (>= 1.10), libhicn-dev (>= stable_version), libmemif-dev (>= stable_version), libparc-dev (>= 1.0), vpp-dev (>= stable_version-release), vpp-dev (<< next_version-release)" CACHE STRING "Dependencies for deb/rpm package." ) set(lib${LIBTRANSPORT}-dev_RPM_DEPENDENCIES - "lib${LIBTRANSPORT} >= stable_version, asio-devel >= 1.10, lib${LIBHICN}-devel >= stable_version, libparc-devel >= 1.0, vpp-devel >= stable_version-release, vpp-devel < next_version-release" + "lib${LIBTRANSPORT} >= stable_version, asio-devel >= 1.10, lib${LIBHICN}-devel >= stable_version, libmemif-devel >= stable_version, libparc-devel >= 1.0, vpp-devel >= stable_version-release, vpp-devel < next_version-release" CACHE STRING "Dependencies for deb/rpm package." ) |