1 # Copyright (c) 2018 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
14 option(VPP_BUFFER_FAULT_INJECTOR "Include the buffer fault injector" OFF)
16 ##############################################################################
17 # Generate vlib/config.h
18 ##############################################################################
19 if(VPP_BUFFER_FAULT_INJECTOR)
20 set(BUFFER_ALLOC_FAULT_INJECTOR 1 CACHE STRING "fault injector on")
22 set(BUFFER_ALLOC_FAULT_INJECTOR 0 CACHE STRING "fault injector off")
25 set(PRE_DATA_SIZE 128 CACHE STRING "Buffer headroom size.")
27 ${CMAKE_SOURCE_DIR}/vlib/config.h.in
28 ${CMAKE_BINARY_DIR}/vlib/config.h
31 FILES ${CMAKE_BINARY_DIR}/vlib/config.h
32 DESTINATION include/vlib
36 ##############################################################################
37 # Find lib and include files
38 ##############################################################################
39 message(STATUS "Looking for libuuid")
40 find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
41 find_library(UUID_LIB NAMES uuid)
43 if(UUID_INCLUDE_DIR AND UUID_LIB)
44 include_directories(${UUID_INCLUDE_DIR})
45 set(VMBUS_SOURCE linux/vmbus.c)
47 message(STATUS "Found uuid in ${UUID_INCLUDE_DIR}")
49 message(WARNING "-- libuuid not found - vmbus support disabled")
52 ##############################################################################
54 ##############################################################################
132 LINK_LIBRARIES vppinfra svm ${VMBUS_LIBS} ${CMAKE_DL_LIBS}