X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2FCMakeLists.txt;h=32984c0cee95ba457deca37d5c4ecc1c5bd13db4;hb=3459ece6da90627b161e2128b5926f1e58e7db65;hp=a5ac2f6d81a39bcd184e62c34d760779b6341da1;hpb=34716fae918750e4fc7a7da4b06e0dfbdef2d1c5;p=vpp.git diff --git a/src/vpp/CMakeLists.txt b/src/vpp/CMakeLists.txt index a5ac2f6d81a..32984c0cee9 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,17 +33,25 @@ 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 +) + set(VPP_API_FILES + api/vpe_types.api api/vpe.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,9 +61,9 @@ set(VPP_SOURCES app/vpe_cli.c app/version.c stats/stat_segment.c + stats/stat_segment_provider.c api/api.c api/json_format.c - api/custom_dump.c api/types.c ) @@ -77,9 +85,8 @@ add_vpp_executable(vpp ) add_vpp_headers(vpp - api/vpe_msg_enum.h - api/vpe_all_api_h.h stats/stat_segment.h + stats/stat_segment_shared.h ) ############################################################################## @@ -114,5 +121,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()