summaryrefslogtreecommitdiffstats
path: root/libtransport/CMakeLists.txt
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-09-24 13:28:37 +0000
committerGerrit Code Review <gerrit@fd.io>2019-09-24 13:28:37 +0000
commit7452ef6cb7be56a054f4bed2d1846ba874ab717c (patch)
tree2fe4f9f0a7f41909095caaf8c22b9b9b058b8a93 /libtransport/CMakeLists.txt
parent70a51ce9c175019f8394f523100a3c7066d3a4bc (diff)
parenta0da41b243661a039481d2c254d7db8f55f18d2b (diff)
Merge "[HICN-279] Added libmemif packaging."
Diffstat (limited to 'libtransport/CMakeLists.txt')
-rw-r--r--libtransport/CMakeLists.txt47
1 files changed, 31 insertions, 16 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)