c3dfba924a5e90e5d35e6fd3c4e15fae08d293be
[vpp.git] / src / vlib / CMakeLists.txt
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 )
22 install(
23   FILES ${CMAKE_BINARY_DIR}/vlib/config.h
24   DESTINATION include/vlib
25   COMPONENT vpp-dev
26 )
27
28 ##############################################################################
29 # vlib shared library
30 ##############################################################################
31 add_vpp_library(vlib
32   SOURCES
33   buffer.c
34   buffer_serialize.c
35   cli.c
36   counter.c
37   error.c
38   format.c
39   i2c.c
40   init.c
41   linux/pci.c
42   linux/physmem.c
43   linux/vfio.c
44   log.c
45   main.c
46   mc.c
47   node.c
48   node_cli.c
49   node_format.c
50   pci/pci.c
51   threads.c
52   threads_cli.c
53   trace.c
54   unix/cj.c
55   unix/cli.c
56   unix/input.c
57   unix/main.c
58   unix/mc_socket.c
59   unix/plugin.c
60   unix/util.c
61
62   INSTALL_HEADERS
63   buffer_funcs.h
64   buffer.h
65   buffer_node.h
66   cli_funcs.h
67   cli.h
68   counter.h
69   defs.h
70   error_funcs.h
71   error.h
72   format_funcs.h
73   global_funcs.h
74   i2c.h
75   init.h
76   linux/vfio.h
77   log.h
78   main.h
79   mc.h
80   node_funcs.h
81   node.h
82   pci/pci_config.h
83   pci/pci.h
84   physmem_funcs.h
85   physmem.h
86   threads.h
87   trace_funcs.h
88   trace.h
89   unix/cj.h
90   unix/mc_socket.h
91   unix/plugin.h
92   unix/unix.h
93   vlib.h
94
95   LINK_LIBRARIES vppinfra svm ${CMAKE_DL_LIBS}
96 )