blob: c2a0d63f4d80adba3558538ce06666bf210f323b [file] [log] [blame]
Damjan Marion612dd6a2018-07-30 12:45:07 +02001# 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##############################################################################
17set(PRE_DATA_SIZE 128 CACHE STRING "Buffer headroom size.")
18configure_file(
19 ${CMAKE_SOURCE_DIR}/vlib/config.h.in
20 ${CMAKE_BINARY_DIR}/vlib/config.h
21)
Damjan Marion833de8c2018-09-07 12:39:02 +020022install(
23 FILES ${CMAKE_BINARY_DIR}/vlib/config.h
24 DESTINATION include/vlib
25 COMPONENT vpp-dev
26)
Damjan Marion612dd6a2018-07-30 12:45:07 +020027
28##############################################################################
Stephen Hemminger6fbef232018-10-15 12:52:30 -070029# Find lib and include files
30##############################################################################
31message(STATUS "Looking for libuuid")
32find_path(UUID_INCLUDE_DIR NAMES uuid/uuid.h)
33find_library(UUID_LIB NAMES uuid)
34
35if(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}")
40else()
41 message(WARNING "-- libuuid not found - vmbus support disabled")
42endif()
43
44##############################################################################
Damjan Marion612dd6a2018-07-30 12:45:07 +020045# vlib shared library
46##############################################################################
Damjan Marion4553c952018-08-26 11:04:40 +020047add_vpp_library(vlib
48 SOURCES
Damjan Marion612dd6a2018-07-30 12:45:07 +020049 buffer.c
Damjan Marion612dd6a2018-07-30 12:45:07 +020050 cli.c
51 counter.c
Neale Ranns22e1f1d2019-03-01 15:53:11 +000052 drop.c
Damjan Marion612dd6a2018-07-30 12:45:07 +020053 error.c
54 format.c
Dave Baracha638c182019-06-21 18:24:07 -040055 handoff_trace.c
Damjan Marion612dd6a2018-07-30 12:45:07 +020056 i2c.c
57 init.c
58 linux/pci.c
Damjan Marion612dd6a2018-07-30 12:45:07 +020059 linux/vfio.c
60 log.c
61 main.c
Damjan Marion612dd6a2018-07-30 12:45:07 +020062 node.c
63 node_cli.c
64 node_format.c
65 pci/pci.c
Jakub Grajciar53f06a02020-03-30 08:12:57 +020066 pci/pci_types_api.c
Damjan Marion68b4da62018-09-30 18:26:20 +020067 physmem.c
Neale Ranns76b56492018-09-28 15:16:14 +000068 punt.c
69 punt_node.c
Damjan Marion612dd6a2018-07-30 12:45:07 +020070 threads.c
71 threads_cli.c
72 trace.c
73 unix/cj.c
74 unix/cli.c
75 unix/input.c
76 unix/main.c
Damjan Marion612dd6a2018-07-30 12:45:07 +020077 unix/plugin.c
78 unix/util.c
Stephen Hemminger6fbef232018-10-15 12:52:30 -070079 vmbus/vmbus.c
80 ${VMBUS_SOURCE}
Damjan Marion612dd6a2018-07-30 12:45:07 +020081
Neale Ranns22e1f1d2019-03-01 15:53:11 +000082 MULTIARCH_SOURCES
83 drop.c
Neale Ranns76b56492018-09-28 15:16:14 +000084 punt_node.c
Neale Ranns22e1f1d2019-03-01 15:53:11 +000085
Damjan Marion4553c952018-08-26 11:04:40 +020086 INSTALL_HEADERS
Damjan Marion612dd6a2018-07-30 12:45:07 +020087 buffer_funcs.h
88 buffer.h
89 buffer_node.h
Damjan Marion612dd6a2018-07-30 12:45:07 +020090 cli.h
91 counter.h
Ole Troan58492a82018-09-04 13:19:12 +020092 counter_types.h
Damjan Marion612dd6a2018-07-30 12:45:07 +020093 defs.h
94 error_funcs.h
95 error.h
96 format_funcs.h
97 global_funcs.h
98 i2c.h
99 init.h
100 linux/vfio.h
101 log.h
102 main.h
Damjan Marion612dd6a2018-07-30 12:45:07 +0200103 node_funcs.h
104 node.h
105 pci/pci_config.h
106 pci/pci.h
Jakub Grajciar53f06a02020-03-30 08:12:57 +0200107 pci/pci_types_api.h
Damjan Marion612dd6a2018-07-30 12:45:07 +0200108 physmem_funcs.h
109 physmem.h
Neale Ranns76b56492018-09-28 15:16:14 +0000110 punt.h
Damjan Marion612dd6a2018-07-30 12:45:07 +0200111 threads.h
112 trace_funcs.h
113 trace.h
114 unix/cj.h
115 unix/mc_socket.h
116 unix/plugin.h
117 unix/unix.h
118 vlib.h
Stephen Hemminger6fbef232018-10-15 12:52:30 -0700119 vmbus/vmbus.h
Damjan Marion612dd6a2018-07-30 12:45:07 +0200120
Jakub Grajciar53f06a02020-03-30 08:12:57 +0200121 API_FILES
122 pci/pci_types.api
123
Stephen Hemminger6fbef232018-10-15 12:52:30 -0700124 LINK_LIBRARIES vppinfra svm ${VMBUS_LIBS} ${CMAKE_DL_LIBS}
Jakub Grajciar53f06a02020-03-30 08:12:57 +0200125
126 DEPENDS api_headers
Damjan Marion4553c952018-08-26 11:04:40 +0200127)