summaryrefslogtreecommitdiffstats
path: root/src/vlib/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2018-10-15 12:52:30 -0700
committerDamjan Marion <damarion@cisco.com>2018-12-19 08:34:39 +0100
commit6fbef2322870bbe1768537caecc3ca06bfd70dd7 (patch)
tree9c588f17b05d5bedf57b7207694d3e92136a4cbd /src/vlib/CMakeLists.txt
parentb0b9dadc5c57b96ed43427ca78430e52fed9196e (diff)
vlib: support Hyper-v/Azure VMBus
This patch adds support for VMBus to the VPP infrastructure. Since the only device that matters is the netvsc Poll Mode Driver in DPDK, the infrastructure is much simpler than PCI. Change-Id: Ie96c897ad9c426716c2398e4528688ce2217419b Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'src/vlib/CMakeLists.txt')
-rw-r--r--src/vlib/CMakeLists.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt
index 2a6cbd54da2..2209923547a 100644
--- a/src/vlib/CMakeLists.txt
+++ b/src/vlib/CMakeLists.txt
@@ -26,6 +26,22 @@ install(
)
##############################################################################
+# Find lib and include files
+##############################################################################
+message(STATUS "Looking for libuuid")
+find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
+find_library(UUID_LIB NAMES uuid)
+
+if(UUID_INCLUDE_DIR AND UUID_LIB)
+ include_directories(${UUID_INCLUDE_DIR})
+ set(VMBUS_SOURCE linux/vmbus.c)
+ set(VMBUS_LIBS uuid)
+ message(STATUS "Found uuid in ${UUID_INCLUDE_DIR}")
+else()
+ message(WARNING "-- libuuid not found - vmbus support disabled")
+endif()
+
+##############################################################################
# vlib shared library
##############################################################################
add_vpp_library(vlib
@@ -56,6 +72,8 @@ add_vpp_library(vlib
unix/main.c
unix/plugin.c
unix/util.c
+ vmbus/vmbus.c
+ ${VMBUS_SOURCE}
INSTALL_HEADERS
buffer_funcs.h
@@ -89,6 +107,7 @@ add_vpp_library(vlib
unix/plugin.h
unix/unix.h
vlib.h
+ vmbus/vmbus.h
- LINK_LIBRARIES vppinfra svm ${CMAKE_DL_LIBS}
+ LINK_LIBRARIES vppinfra svm ${VMBUS_LIBS} ${CMAKE_DL_LIBS}
)