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 | |
| 14 | ############################################################################## |
| 15 | # Generate vlib/config.h |
| 16 | ############################################################################## |
| 17 | set(PRE_DATA_SIZE 128 CACHE STRING "Buffer headroom size.") |
| 18 | configure_file( |
| 19 | ${CMAKE_SOURCE_DIR}/vlib/config.h.in |
| 20 | ${CMAKE_BINARY_DIR}/vlib/config.h |
| 21 | ) |
Damjan Marion | 833de8c | 2018-09-07 12:39:02 +0200 | [diff] [blame] | 22 | install( |
| 23 | FILES ${CMAKE_BINARY_DIR}/vlib/config.h |
| 24 | DESTINATION include/vlib |
| 25 | COMPONENT vpp-dev |
| 26 | ) |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 27 | |
| 28 | ############################################################################## |
Stephen Hemminger | 6fbef23 | 2018-10-15 12:52:30 -0700 | [diff] [blame] | 29 | # Find lib and include files |
| 30 | ############################################################################## |
| 31 | message(STATUS "Looking for libuuid") |
| 32 | find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h) |
| 33 | find_library(UUID_LIB NAMES uuid) |
| 34 | |
| 35 | if(UUID_INCLUDE_DIR AND UUID_LIB) |
| 36 | include_directories(${UUID_INCLUDE_DIR}) |
| 37 | set(VMBUS_SOURCE linux/vmbus.c) |
| 38 | set(VMBUS_LIBS uuid) |
| 39 | message(STATUS "Found uuid in ${UUID_INCLUDE_DIR}") |
| 40 | else() |
| 41 | message(WARNING "-- libuuid not found - vmbus support disabled") |
| 42 | endif() |
| 43 | |
| 44 | ############################################################################## |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 45 | # vlib shared library |
| 46 | ############################################################################## |
Damjan Marion | 4553c95 | 2018-08-26 11:04:40 +0200 | [diff] [blame] | 47 | add_vpp_library(vlib |
| 48 | SOURCES |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 49 | buffer.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 50 | cli.c |
| 51 | counter.c |
Neale Ranns | 22e1f1d | 2019-03-01 15:53:11 +0000 | [diff] [blame] | 52 | drop.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 53 | error.c |
| 54 | format.c |
| 55 | i2c.c |
| 56 | init.c |
| 57 | linux/pci.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 58 | linux/vfio.c |
| 59 | log.c |
| 60 | main.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 61 | node.c |
| 62 | node_cli.c |
| 63 | node_format.c |
| 64 | pci/pci.c |
Damjan Marion | 68b4da6 | 2018-09-30 18:26:20 +0200 | [diff] [blame] | 65 | physmem.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 66 | threads.c |
| 67 | threads_cli.c |
| 68 | trace.c |
| 69 | unix/cj.c |
| 70 | unix/cli.c |
| 71 | unix/input.c |
| 72 | unix/main.c |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 73 | unix/plugin.c |
| 74 | unix/util.c |
Stephen Hemminger | 6fbef23 | 2018-10-15 12:52:30 -0700 | [diff] [blame] | 75 | vmbus/vmbus.c |
| 76 | ${VMBUS_SOURCE} |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 77 | |
Neale Ranns | 22e1f1d | 2019-03-01 15:53:11 +0000 | [diff] [blame] | 78 | MULTIARCH_SOURCES |
| 79 | drop.c |
| 80 | |
Damjan Marion | 4553c95 | 2018-08-26 11:04:40 +0200 | [diff] [blame] | 81 | INSTALL_HEADERS |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 82 | buffer_funcs.h |
| 83 | buffer.h |
| 84 | buffer_node.h |
| 85 | cli_funcs.h |
| 86 | cli.h |
| 87 | counter.h |
Ole Troan | 58492a8 | 2018-09-04 13:19:12 +0200 | [diff] [blame] | 88 | counter_types.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 89 | defs.h |
| 90 | error_funcs.h |
| 91 | error.h |
| 92 | format_funcs.h |
| 93 | global_funcs.h |
| 94 | i2c.h |
| 95 | init.h |
| 96 | linux/vfio.h |
| 97 | log.h |
| 98 | main.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 99 | node_funcs.h |
| 100 | node.h |
| 101 | pci/pci_config.h |
| 102 | pci/pci.h |
| 103 | physmem_funcs.h |
| 104 | physmem.h |
| 105 | threads.h |
| 106 | trace_funcs.h |
| 107 | trace.h |
| 108 | unix/cj.h |
| 109 | unix/mc_socket.h |
| 110 | unix/plugin.h |
| 111 | unix/unix.h |
| 112 | vlib.h |
Stephen Hemminger | 6fbef23 | 2018-10-15 12:52:30 -0700 | [diff] [blame] | 113 | vmbus/vmbus.h |
Damjan Marion | 612dd6a | 2018-07-30 12:45:07 +0200 | [diff] [blame] | 114 | |
Stephen Hemminger | 6fbef23 | 2018-10-15 12:52:30 -0700 | [diff] [blame] | 115 | LINK_LIBRARIES vppinfra svm ${VMBUS_LIBS} ${CMAKE_DL_LIBS} |
Damjan Marion | 4553c95 | 2018-08-26 11:04:40 +0200 | [diff] [blame] | 116 | ) |