aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/CMakeLists.txt
blob: dceb13e7ce408189b0a11f90cfd8e00b8772d72c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

##############################################################################
# Generate vlib/config.h
##############################################################################
set(PRE_DATA_SIZE 128 CACHE STRING "Buffer headroom size.")
configure_file(
  ${CMAKE_SOURCE_DIR}/vlib/config.h.in
  ${CMAKE_BINARY_DIR}/vlib/config.h
)
install(FILES ${CMAKE_BINARY_DIR}/vlib/config.h DESTINATION include/vlib)

##############################################################################
# vlib shared library
##############################################################################
set(VLIB_SRCS
  buffer.c
  buffer_serialize.c
  cli.c
  counter.c
  error.c
  format.c
  i2c.c
  init.c
  linux/pci.c
  linux/physmem.c
  linux/vfio.c
  log.c
  main.c
  mc.c
  node.c
  node_cli.c
  node_format.c
  pci/pci.c
  threads.c
  threads_cli.c
  trace.c
  unix/cj.c
  unix/cli.c
  unix/input.c
  unix/main.c
  unix/mc_socket.c
  unix/plugin.c
  unix/util.c
)

add_library(vlib SHARED ${VLIB_SRCS})
target_link_libraries(vlib vppinfra svm ${CMAKE_DL_LIBS})
install(TARGETS vlib DESTINATION lib)

##############################################################################
# vlib headers
##############################################################################
vpp_add_header_files(vlib
  buffer_funcs.h
  buffer.h
  buffer_node.h
  cli_funcs.h
  cli.h
  counter.h
  defs.h
  error_funcs.h
  error.h
  format_funcs.h
  global_funcs.h
  i2c.h
  init.h
  linux/vfio.h
  log.h
  main.h
  mc.h
  node_funcs.h
  node.h
  pci/pci_config.h
  pci/pci.h
  physmem_funcs.h
  physmem.h
  threads.h
  trace_funcs.h
  trace.h
  unix/cj.h
  unix/mc_socket.h
  unix/plugin.h
  unix/unix.h
  vlib.h
)