aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/CMakeLists.txt')
-rw-r--r--src/vlib/CMakeLists.txt98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt
new file mode 100644
index 00000000000..dceb13e7ce4
--- /dev/null
+++ b/src/vlib/CMakeLists.txt
@@ -0,0 +1,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
+)
+