X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvat%2FCMakeLists.txt;h=9d37b7ba83e3e1c3cc5c9517819db4e95070ecf5;hb=3ec09e9243dceb78e7548725281b0da8eddf72b1;hp=9edfec76624fa89bf40736d376dcc01dc1779ac7;hpb=99ddcc3f8b5549252fcf834e2a25aa39ba0b880e;p=vpp.git diff --git a/src/vat/CMakeLists.txt b/src/vat/CMakeLists.txt index 9edfec76624..9d37b7ba83e 100644 --- a/src/vat/CMakeLists.txt +++ b/src/vat/CMakeLists.txt @@ -14,50 +14,57 @@ ############################################################################## # vat plugin shared library ############################################################################## -add_library(vatplugin SHARED plugin_api.c) -target_link_libraries(vatplugin vppinfra) -add_dependencies (vatplugin vppinfra) -install(TARGETS vatplugin DESTINATION lib) +add_vpp_library(vatplugin + SOURCES plugin_api.c + LINK_LIBRARIES vppinfra +) ############################################################################## # vpp_api_test ############################################################################## -add_executable (vpp_api_test +add_vpp_executable(vpp_api_test ENABLE_EXPORTS + SOURCES api_format.c main.c plugin.c json_format.c - vat.h - json_format.h + types.c + ip_types_api.c + ip_types.c + protocols.def + + DEPENDS api_headers + + LINK_LIBRARIES + vlibmemoryclient + svm + vatplugin + vppinfra + Threads::Threads + rt m dl crypto ) -target_link_libraries (vpp_api_test vlibmemoryclient svm vatplugin vppinfra - Threads::Threads rt m dl crypto) -set_target_properties(vpp_api_test PROPERTIES ENABLE_EXPORTS 1) -install(TARGETS vpp_api_test DESTINATION bin) ############################################################################## # vpp_json_test ############################################################################## -add_executable (vpp_json_test - json_format.h - json_format.c - json_test.c) -target_link_libraries(vpp_json_test vppinfra m) -set_target_properties(vpp_json_test PROPERTIES ENABLE_EXPORTS 1) -install(TARGETS vpp_json_test DESTINATION bin) +add_vpp_executable(vpp_json_test ENABLE_EXPORTS NO_INSTALL + SOURCES json_format.c json_test.c + LINK_LIBRARIES vppinfra m +) ############################################################################## # vat headers ############################################################################## -vpp_add_header_files(vat - vat.h - json_format.h +install( + FILES vat.h json_format.h + DESTINATION include/vat + COMPONENT vpp-dev ) ############################################################################## # restart ############################################################################## -add_executable (vpp_restart restart.c) -target_link_libraries (vpp_restart svmdb svm vppinfra pthread rt) -install(TARGETS vpp_restart DESTINATION bin ) - +add_vpp_executable(vpp_restart + SOURCES restart.c + LINK_LIBRARIES svm svmdb vppinfra Threads::Threads rt +)