X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2FCMakeLists.txt;h=44c1f6d6b113ca913b52e422e8644c35753f569e;hb=8973b07eecbbfe23a5267975f8052a5c6339c756;hp=d14aa6145ea3679defecdc081fbc7e401fead470;hpb=903cf399a508f66974cab4c46877d0d07711f355;p=vpp.git diff --git a/src/vpp/CMakeLists.txt b/src/vpp/CMakeLists.txt index d14aa6145ea..44c1f6d6b11 100644 --- a/src/vpp/CMakeLists.txt +++ b/src/vpp/CMakeLists.txt @@ -15,17 +15,17 @@ # Generate vpp/app/version.h ############################################################################## add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/include/vpp/app/version.h + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/app/version.h WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND mkdir - ARGS -p ${CMAKE_BINARY_DIR}/include/vpp/app + ARGS -p ${CMAKE_CURRENT_BINARY_DIR}/app COMMAND scripts/generate_version_h - ARGS ${CMAKE_BINARY_DIR}/include/vpp/app/version.h + ARGS ${CMAKE_CURRENT_BINARY_DIR}/app/version.h COMMENT "Generating VPP version.h" ) add_custom_target(vpp_version_h - DEPENDS ${CMAKE_BINARY_DIR}/include/vpp/app/version.h + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/app/version.h ) ############################################################################## @@ -33,18 +33,31 @@ add_custom_target(vpp_version_h ############################################################################## option(VPP_API_TEST_BUILTIN "Use builtin VPP API test." ON) +configure_file( + ${CMAKE_SOURCE_DIR}/vpp/vnet/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/vnet/config.h +) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/vnet/config.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vpp/vnet + COMPONENT vpp-dev +) + set(VPP_API_FILES + api/vpe_types.api api/vpe.api - oam/oam.api ) -vpp_add_api_files(vpp ${VPP_API_FILES}) +vpp_add_api_files(vpp core vpp ${VPP_API_FILES}) foreach(file ${VPP_API_FILES}) get_filename_component(dir ${file} DIRECTORY) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}.h - DESTINATION include/vpp/${dir} + ${CMAKE_CURRENT_BINARY_DIR}/${file}_enum.h + ${CMAKE_CURRENT_BINARY_DIR}/${file}_types.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vpp/${dir} COMPONENT vpp-dev ) endforeach() @@ -53,12 +66,8 @@ set(VPP_SOURCES vnet/main.c app/vpe_cli.c app/version.c - oam/oam.c - oam/oam_api.c - stats/stat_segment.c api/api.c api/json_format.c - api/custom_dump.c api/types.c ) @@ -79,12 +88,6 @@ add_vpp_executable(vpp DEPENDS vpp_version_h api_headers ) -add_vpp_headers(vpp - api/vpe_msg_enum.h - api/vpe_all_api_h.h - stats/stat_segment.h -) - ############################################################################## # vppctl binary ############################################################################## @@ -117,5 +120,34 @@ add_vpp_executable(vpp_prometheus_export DEPENDS api_headers ) -install(FILES conf/startup.conf DESTINATION etc/vpp COMPONENT vpp) -install(FILES conf/80-vpp.conf DESTINATION etc/sysctl.d COMPONENT vpp) +############################################################################## +# vppmem_preload library +############################################################################## +add_vpp_library(vppmem_preload + SOURCES mem/mem.c + LINK_LIBRARIES vppinfra +) + +install(FILES conf/startup.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/vpp COMPONENT vpp) +install(FILES conf/80-vpp.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sysctl.d COMPONENT vpp) + +############################################################################## +# VAT2 plugins +############################################################################## +add_vpp_test_library(vpp + ${VPP_API_FILES} +) + +add_vat_test_library(vpp + api/api_test.c +) + +############################################################################## +# minimal interactive startup.conf - only if not present +############################################################################## +if(NOT EXISTS ${CMAKE_BINARY_DIR}/startup.conf) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/conf/startup.conf.in + ${CMAKE_BINARY_DIR}/startup.conf + ) +endif()