aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-08-26 11:04:40 +0200
committerDamjan Marion <damarion@cisco.com>2018-08-26 13:50:53 +0200
commit4553c95ab7cac75838433fdd5cd3c0d0c1d6e2e6 (patch)
tree248b50ad7df32be9f1662920ed9c322e23de6b91 /src/vlib
parentd16004d56c22635a0e21b177933dc39b65a3642a (diff)
cmake: add add_vpp_library and add_vpp_executable macros
Change-Id: I1382021a6f616571b4b3243ba8c8999239d10815 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/CMakeLists.txt16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/vlib/CMakeLists.txt b/src/vlib/CMakeLists.txt
index dceb13e7ce4..59c725fbc5f 100644
--- a/src/vlib/CMakeLists.txt
+++ b/src/vlib/CMakeLists.txt
@@ -24,7 +24,8 @@ install(FILES ${CMAKE_BINARY_DIR}/vlib/config.h DESTINATION include/vlib)
##############################################################################
# vlib shared library
##############################################################################
-set(VLIB_SRCS
+add_vpp_library(vlib
+ SOURCES
buffer.c
buffer_serialize.c
cli.c
@@ -53,16 +54,8 @@ set(VLIB_SRCS
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
+ INSTALL_HEADERS
buffer_funcs.h
buffer.h
buffer_node.h
@@ -94,5 +87,6 @@ vpp_add_header_files(vlib
unix/plugin.h
unix/unix.h
vlib.h
-)
+ LINK_LIBRARIES vppinfra svm ${CMAKE_DL_LIBS}
+)