Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 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: |
| 5 | # |
| 6 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | # |
| 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. |
| 13 | |
Dave Barach | c74b43c | 2020-04-09 17:24:07 -0400 | [diff] [blame] | 14 | option(VPP_BUFFER_FAULT_INJECTOR "Include the buffer fault injector" OFF) |
| 15 | |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 16 | ############################################################################## |
| 17 | # Generate vlib/config.h |
| 18 | ############################################################################## |
Dave Barach | c74b43c | 2020-04-09 17:24:07 -0400 | [diff] [blame] | 19 | if(VPP_BUFFER_FAULT_INJECTOR) |
| 20 | set(BUFFER_ALLOC_FAULT_INJECTOR 1 CACHE STRING "fault injector on") |
| 21 | else() |
| 22 | set(BUFFER_ALLOC_FAULT_INJECTOR 0 CACHE STRING "fault injector off") |
| 23 | endif() |
| 24 | |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 25 | set(PRE_DATA_SIZE 128 CACHE STRING "Buffer headroom size.") |
| 26 | configure_file( |
| 27 | ${CMAKE_SOURCE_DIR}/vlib/config.h.in |
| 28 | ${CMAKE_BINARY_DIR}/vlib/config.h |
| 29 | ) |
Damjan Marion | 833de8c | 2018-09-07 12:39:02 +0200 | [diff] [blame] | 30 | install( |
| 31 | FILES ${CMAKE_BINARY_DIR}/vlib/config.h |
| 32 | DESTINATION include/vlib |
| 33 | COMPONENT vpp-dev |
| 34 | ) |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 35 | |
| 36 | ############################################################################## |
Stephen Hemminger | 6fbef23 | 2018-10-15 12:52:30 -0700 | [diff] [blame] | 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) |
| 42 | |
| 43 | if(UUID_INCLUDE_DIR AND UUID_LIB) |
| 44 | include_directories(${UUID_INCLUDE_DIR}) |
| 45 | set(VMBUS_SOURCE linux/vmbus.c) |
| 46 | set(VMBUS_LIBS uuid) |
| 47 | message(STATUS "Found uuid in ${UUID_INCLUDE_DIR}") |
| 48 | else() |
| 49 | message(WARNING "-- libuuid not found - vmbus support disabled") |
| 50 | endif() |
| 51 | |
| 52 | ############################################################################## |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 53 | # vlib shared library |
| 54 | ############################################################################## |
Damjan Marion | 4553c95 | 2018-08-26 11:04:40 +0200 | [diff] [blame] | 55 | add_vpp_library(vlib |
| 56 | SOURCES |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 57 | buffer.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 58 | cli.c |
| 59 | counter.c |
Neale Ranns | 22e1f1d | 2019-03-01 15:53:11 +0000 | [diff] [blame] | 60 | drop.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 61 | error.c |
| 62 | format.c |
Dave Barach | a638c18 | 2019-06-21 18:24:07 -0400 | [diff] [blame] | 63 | handoff_trace.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 64 | init.c |
| 65 | linux/pci.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 66 | linux/vfio.c |
| 67 | log.c |
| 68 | main.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 69 | node.c |
| 70 | node_cli.c |
| 71 | node_format.c |
Ray Kinsella | 4830e4f | 2020-03-10 14:35:32 +0000 | [diff] [blame] | 72 | node_init.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 73 | pci/pci.c |
Jakub Grajciar | 53f06a0 | 2020-03-30 08:12:57 +0200 | [diff] [blame] | 74 | pci/pci_types_api.c |
Damjan Marion | 68b4da6 | 2018-09-30 18:26:20 +0200 | [diff] [blame] | 75 | physmem.c |
Neale Ranns | 76b5649 | 2018-09-28 15:16:14 +0000 | [diff] [blame] | 76 | punt.c |
| 77 | punt_node.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 78 | threads.c |
| 79 | threads_cli.c |
| 80 | trace.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 81 | unix/cli.c |
| 82 | unix/input.c |
| 83 | unix/main.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 84 | unix/plugin.c |
| 85 | unix/util.c |
Stephen Hemminger | 6fbef23 | 2018-10-15 12:52:30 -0700 | [diff] [blame] | 86 | vmbus/vmbus.c |
| 87 | ${VMBUS_SOURCE} |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 88 | |
Neale Ranns | 22e1f1d | 2019-03-01 15:53:11 +0000 | [diff] [blame] | 89 | MULTIARCH_SOURCES |
| 90 | drop.c |
Neale Ranns | 76b5649 | 2018-09-28 15:16:14 +0000 | [diff] [blame] | 91 | punt_node.c |
Ray Kinsella | 4830e4f | 2020-03-10 14:35:32 +0000 | [diff] [blame] | 92 | node_init.c |
Neale Ranns | 22e1f1d | 2019-03-01 15:53:11 +0000 | [diff] [blame] | 93 | |
Damjan Marion | 4553c95 | 2018-08-26 11:04:40 +0200 | [diff] [blame] | 94 | INSTALL_HEADERS |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 95 | buffer_funcs.h |
| 96 | buffer.h |
| 97 | buffer_node.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 98 | cli.h |
| 99 | counter.h |
Ole Troan | 58492a8 | 2018-09-04 13:19:12 +0200 | [diff] [blame] | 100 | counter_types.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 101 | defs.h |
| 102 | error_funcs.h |
| 103 | error.h |
| 104 | format_funcs.h |
| 105 | global_funcs.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 106 | init.h |
| 107 | linux/vfio.h |
| 108 | log.h |
| 109 | main.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 110 | node_funcs.h |
| 111 | node.h |
| 112 | pci/pci_config.h |
| 113 | pci/pci.h |
Jakub Grajciar | 53f06a0 | 2020-03-30 08:12:57 +0200 | [diff] [blame] | 114 | pci/pci_types_api.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 115 | physmem_funcs.h |
| 116 | physmem.h |
Neale Ranns | 76b5649 | 2018-09-28 15:16:14 +0000 | [diff] [blame] | 117 | punt.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 118 | threads.h |
| 119 | trace_funcs.h |
| 120 | trace.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 121 | unix/mc_socket.h |
| 122 | unix/plugin.h |
| 123 | unix/unix.h |
| 124 | vlib.h |
Stephen Hemminger | 6fbef23 | 2018-10-15 12:52:30 -0700 | [diff] [blame] | 125 | vmbus/vmbus.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 126 | |
Jakub Grajciar | 53f06a0 | 2020-03-30 08:12:57 +0200 | [diff] [blame] | 127 | API_FILES |
| 128 | pci/pci_types.api |
| 129 | |
Stephen Hemminger | 6fbef23 | 2018-10-15 12:52:30 -0700 | [diff] [blame] | 130 | LINK_LIBRARIES vppinfra svm ${VMBUS_LIBS} ${CMAKE_DL_LIBS} |
Jakub Grajciar | 53f06a0 | 2020-03-30 08:12:57 +0200 | [diff] [blame] | 131 | |
| 132 | DEPENDS api_headers |
Damjan Marion | 4553c95 | 2018-08-26 11:04:40 +0200 | [diff] [blame] | 133 | ) |