summaryrefslogtreecommitdiffstats
path: root/src/vlib/CMakeLists.txt
diff options
context:
space:
mode:
authorTom Jones <thj@freebsd.org>2024-01-29 10:33:36 +0000
committerDamjan Marion <dmarion@0xa5.net>2024-02-23 10:01:47 +0000
commit532a1ce98a47cffbbd6454f503c099bd68b426e7 (patch)
treee3a89bd502b51e50f585b5b2a2aeca656061b478 /src/vlib/CMakeLists.txt
parent89c7b545dd3333092e718e2a9194ed72c27a54f7 (diff)
build: Add support to add_vpp_library for platform specific sources
Add support for adding Linux and FreeBSD specific sources to add_vpp_library and support for installing Linux specific headers. Don't add support for FreeBSD specific headers until we have some to install. Type: improvement Change-Id: I38549cf4d71999b71b3298e529323956e54ddc36 Signed-off-by: Tom Jones <thj@freebsd.org>
Diffstat (limited to 'src/vlib/CMakeLists.txt')
-rw-r--r--src/vlib/CMakeLists.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt
index 9c4121672a5..61e8ba7dd78 100644
--- a/src/vlib/CMakeLists.txt
+++ b/src/vlib/CMakeLists.txt
@@ -54,6 +54,17 @@ install(
##############################################################################
# vlib shared library
##############################################################################
+
+set(PLATFORM_SOURCES
+ linux/pci.c
+ linux/vfio.c
+ linux/vmbus.c
+)
+
+set(PLATFORM_HEADERS
+ linux/vfio.h
+)
+
add_vpp_library(vlib
SOURCES
buffer.c
@@ -65,9 +76,6 @@ add_vpp_library(vlib
format.c
handoff_trace.c
init.c
- linux/pci.c
- linux/vfio.c
- linux/vmbus.c
log.c
main.c
node.c
@@ -97,6 +105,7 @@ add_vpp_library(vlib
vmbus/vmbus.c
dma/dma.c
dma/cli.c
+ ${PLATFORM_SOURCES}
MULTIARCH_SOURCES
buffer_funcs.c
@@ -118,7 +127,6 @@ add_vpp_library(vlib
format_funcs.h
global_funcs.h
init.h
- linux/vfio.h
log.h
main.h
node_funcs.h
@@ -140,6 +148,7 @@ add_vpp_library(vlib
unix/unix.h
vlib.h
vmbus/vmbus.h
+ ${PLATFORM_HEADERS}
API_FILES
pci/pci_types.api