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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
14 ##############################################################################
15 # Generate vpp/app/version.h
16 ##############################################################################
18 OUTPUT ${CMAKE_BINARY_DIR}/include/vpp/app/version.h
19 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
21 ARGS -p ${CMAKE_BINARY_DIR}/include/vpp/app
22 COMMAND scripts/generate_version_h
23 ARGS ${CMAKE_BINARY_DIR}/include/vpp/app/version.h
24 COMMENT "Generating VPP version.h"
27 add_custom_target(vpp_version_h
28 DEPENDS ${CMAKE_BINARY_DIR}/include/vpp/app/version.h
31 ##############################################################################
33 ##############################################################################
35 vpp_add_api_files(vpp_api_headers
56 target_link_libraries(vpp svm vlib vppinfra vlibmemory vnet Threads::Threads
58 add_dependencies(vpp vpp_version_h api_headers)
59 set_target_properties(vpp PROPERTIES ENABLE_EXPORTS 1)
60 install(TARGETS vpp DESTINATION bin)
62 ##############################################################################
64 ##############################################################################
65 add_executable(vppctl app/vppctl.c)
66 target_link_libraries(vppctl vppinfra)
67 install(TARGETS vppctl DESTINATION bin)
69 ##############################################################################
70 # vpp_get_metrics binary
71 ##############################################################################
72 add_executable (vpp_get_metrics api/vpp_get_metrics.c ${VPP_API_HDRS})
73 target_link_libraries (vpp_get_metrics vppinfra svm svmdb)
74 install(TARGETS vpp_get_metrics DESTINATION bin)
76 ##############################################################################
78 ##############################################################################
79 add_executable(summary_stats_client api/summary_stats_client.c)
80 add_executable(stat_client app/stat_client.c)
81 add_dependencies(summary_stats_client api_headers)
82 add_dependencies(stat_client api_headers)
83 target_link_libraries(summary_stats_client vppinfra svm vlibmemoryclient)
84 target_link_libraries(stat_client vppinfra svm vlibmemoryclient)
86 ##############################################################################
88 ##############################################################################