cmake: add add_vpp_library and add_vpp_executable macros
[vpp.git] / src / svm / 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 # svm shared library
16 ##############################################################################
17 add_vpp_library(svm
18   SOURCES
19   svm.c
20   ssvm.c
21   svm_fifo.c
22   svm_fifo_segment.c
23   queue.c
24   message_queue.c
25
26   INSTALL_HEADERS
27   ssvm.h
28   svm_common.h
29   svm_fifo.h
30   svm_fifo_segment.h
31   queue.h
32   message_queue.h
33   svm.h
34   svmdb.h
35
36   LINK_LIBRARIES vppinfra rt pthread
37 )
38
39 ##############################################################################
40 # svmdb shared library
41 ##############################################################################
42 add_vpp_library(svmdb
43   SOURCES svmdb.c
44   LINK_LIBRARIES svm vppinfra rt pthread
45   )
46
47 ##############################################################################
48 # svm tools
49 ##############################################################################
50
51 add_vpp_executable(svmtool
52   SOURCES svmtool.c
53   LINK_LIBRARIES vppinfra svm
54 )
55
56 add_vpp_executable (svmdbtool
57   SOURCES svmdbtool.c
58   LINK_LIBRARIES vppinfra svm svmdb
59 )