host stack: update stale copyright
[vpp.git] / src / svm / CMakeLists.txt
index a3cca5a..ab6f7f7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2018-2019 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:
 ##############################################################################
 # svm shared library
 ##############################################################################
-add_library(svm SHARED
+add_vpp_library(svm
+  SOURCES
   svm.c
   ssvm.c
   svm_fifo.c
   svm_fifo_segment.c
   queue.c
   message_queue.c
-)
-target_link_libraries(svm vppinfra rt pthread)
-install(TARGETS svm DESTINATION lib)
 
-##############################################################################
-# svmdb shared library
-##############################################################################
-add_library(svmdb SHARED svmdb.c)
-target_link_libraries(svmdb svm vppinfra rt pthread)
-install(TARGETS svmdb DESTINATION lib)
+  MULTIARCH_SOURCES
+  svm_fifo.c
 
-##############################################################################
-# svm headers
-##############################################################################
-vpp_add_header_files(svm
+  INSTALL_HEADERS
   ssvm.h
   svm_common.h
-  svmdb.h
   svm_fifo.h
   svm_fifo_segment.h
   queue.h
   message_queue.h
   svm.h
+  svmdb.h
+
+  LINK_LIBRARIES vppinfra rt pthread
 )
 
 ##############################################################################
-# svm tools
+# svmdb shared library
 ##############################################################################
+add_vpp_library(svmdb
+  SOURCES svmdb.c
+  LINK_LIBRARIES svm vppinfra rt pthread
+  )
 
-add_executable (svmtool svmtool.c)
-target_link_libraries (svmtool vppinfra svm)
-add_executable (svmdbtool svmdbtool.c)
-target_link_libraries (svmdbtool vppinfra svm svmdb)
+##############################################################################
+# svm tools
+##############################################################################
 
-install(
-  TARGETS svmtool svmdbtool
-  DESTINATION bin
+add_vpp_executable(svmtool
+  SOURCES svmtool.c
+  LINK_LIBRARIES vppinfra svm
 )
 
+add_vpp_executable (svmdbtool
+  SOURCES svmdbtool.c
+  LINK_LIBRARIES vppinfra svm svmdb
+)