build: export vapi generation in vpp-dev
[vpp.git] / src / vpp-api / vapi / 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 include_directories (
15   ${CMAKE_CURRENT_SOURCE_DIR}/..
16   ${CMAKE_CURRENT_BINARY_DIR}/..
17 )
18
19 add_vpp_library(vapiclient
20   SOURCES
21   vapi.c
22   libvapiclient.map
23
24   LINK_LIBRARIES vppinfra vlibmemoryclient svm pthread m rt
25   DEPENDS api_headers
26 )
27
28 install(
29   FILES
30     vapi.h
31     vapi_common.h
32     vapi_dbg.h
33     vapi.hpp
34     vapi_internal.h
35   DESTINATION
36     include/vapi
37   COMPONENT
38     vpp-dev
39 )
40
41 install(
42   FILES
43     vapi_c_gen.py
44     vapi_json_parser.py
45     vapi_cpp_gen.py
46   DESTINATION
47     share/vpp
48   COMPONENT
49     vpp-dev
50 )
51
52 install(
53   PROGRAMS
54   vapi_c_gen.py
55   vapi_cpp_gen.py
56   vapi_json_parser.py
57
58   DESTINATION bin
59   COMPONENT vpp-dev
60 )