# See the License for the specific language governing permissions and
# limitations under the License.
+unset (VPPAPICLIENT_LIB)
unset (VAPICLIENT_LIB)
unset (ACL_FILE)
unset (NAT_FILE)
unset (L2E_FILE)
unset (GBP_FILE)
+unset (IGMP_FILE)
unset (VOM_SOURCES)
unset (VOM_HEADERS)
+find_library(VPPAPICLIENT_LIB NAMES vppapiclient REQUIRED)
+find_path(VPPAPICLIENT_INCLUDE_DIR NAMES vpp-api/client/vppapiclient.h)
find_library(VAPICLIENT_LIB NAMES vapiclient REQUIRED)
find_path(VAPICLIENT_INCLUDE_DIR NAMES vapi/vapi.hpp)
+
+if(NOT VPPAPICLIENT_INCLUDE_DIR OR NOT VPPAPICLIENT_LIB)
+ message(FATAL_ERROR "Cannot find vppapiclient library and/or headers")
+endif()
if(NOT VAPICLIENT_INCLUDE_DIR OR NOT VAPICLIENT_LIB)
message(FATAL_ERROR "Cannot find vapiclient library and/or headers")
endif()
+include_directories(${VPPAPICLIENT_INCLUDE_DIR})
include_directories(${VAPICLIENT_INCLUDE_DIR})
include_directories(${CMAKE_SOURCE_DIR})
find_file(NAT_FILE NAMES nat.api.vapi.hpp PATH_SUFFIXES vapi)
find_file(L2E_FILE NAMES l2e.api.vapi.hpp PATH_SUFFIXES vapi)
find_file(GBP_FILE NAMES gbp.api.vapi.hpp PATH_SUFFIXES vapi)
+find_file(IGMP_FILE NAMES igmp.api.vapi.hpp PATH_SUFFIXES vapi)
if(ACL_FILE)
list(APPEND VOM_SOURCES
if(GBP_FILE)
list(APPEND VOM_SOURCES
- gbp_recirc_cmds.cpp
- gbp_recirc.cpp
- gbp_subnet_cmds.cpp
- gbp_subnet.cpp
+ gbp_contract_cmds.cpp
+ gbp_contract.cpp
+ gbp_bridge_domain_cmds.cpp
+ gbp_bridge_domain.cpp
gbp_endpoint_cmds.cpp
gbp_endpoint.cpp
gbp_endpoint_group_cmds.cpp
gbp_endpoint_group.cpp
- gbp_contract_cmds.cpp
- gbp_contract.cpp
+ gbp_ext_itf.cpp
+ gbp_ext_itf_cmds.cpp
+ gbp_recirc_cmds.cpp
+ gbp_recirc.cpp
+ gbp_route_domain_cmds.cpp
+ gbp_route_domain.cpp
+ gbp_rule.cpp
+ gbp_subnet_cmds.cpp
+ gbp_subnet.cpp
+ gbp_vxlan.cpp
+ gbp_vxlan_cmds.cpp
+ )
+endif()
+
+if (IGMP_FILE)
+ list(APPEND VOM_SOURCES
+ igmp_binding_cmds.cpp
+ igmp_binding.cpp
+ igmp_listen_cmds.cpp
+ igmp_listen.cpp
)
endif()
interface_span_cmds.cpp
interface_span.cpp
interface_types.cpp
+ ip_punt_redirect_cmds.cpp
+ ip_punt_redirect.cpp
ip_unnumbered_cmds.cpp
ip_unnumbered.cpp
l2_binding_cmds.cpp
neighbour.cpp
neighbour_cmds.cpp
object_base.cpp
+ mroute_cmds.cpp
om.cpp
pipe.cpp
pipe_cmds.cpp
ra_config.cpp
ra_prefix.cpp
route.cpp
+ route_api_types.cpp
route_cmds.cpp
route_domain.cpp
route_domain_cmds.cpp
+ stat_client.cpp
+ stat_reader.cpp
sub_interface_cmds.cpp
sub_interface.cpp
tap_interface.cpp
tap_interface_cmds.cpp
+ vxlan_gbp_tunnel_cmds.cpp
vxlan_tunnel_cmds.cpp
vxlan_tunnel.cpp
)
if(GBP_FILE)
list(APPEND VOM_HEADERS
+ gbp_contract.hpp
+ gbp_bridge_domain.hpp
gbp_endpoint.hpp
gbp_endpoint_group.hpp
- gbp_subnet.hpp
+ gbp_ext_itf.hpp
gbp_recirc.hpp
- gbp_contract.hpp
+ gbp_route_domain.hpp
+ gbp_rule.hpp
+ gbp_subnet.hpp
+ gbp_vxlan.hpp
+ )
+endif()
+
+if(IGMP_FILE)
+ list(APPEND VOM_HEADERS
+ igmp_binding.hpp
+ igmp_listen.hpp
)
endif()
interface_cmds.hpp
interface_ip6_nd.hpp
interface_span.hpp
+ ip_punt_redirect.hpp
ip_unnumbered.hpp
l2_binding.hpp
l2_xconnect.hpp
rpc_cmd.hpp
singular_db.hpp
singular_db_funcs.hpp
+ stat_client.hpp
+ stat_reader.hpp
sub_interface.hpp
tap_interface.hpp
types.hpp
INSTALL_HEADERS ${VOM_HEADERS}
- LINK_LIBRARIES ${VAPICLIENT_LIB} Threads::Threads boost_thread
- ${BOOST_SYSTEM_LIB} ${BOOST_FILESYSTEM_LIB} ${BOOST_ASIO_LIB} m rt
+ LINK_LIBRARIES ${VPPAPICLIENT_LIB} ${VAPICLIENT_LIB} Threads::Threads
+ ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} m rt
COMPONENT libvom
)
+
+if (Boost_FOUND)
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ add_definitions(-stdlib=libstdc++)
+ endif()
+ add_executable(vom_stats_test test_stats.cpp)
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ target_link_libraries(vom_stats_test vom stdc++)
+ else()
+ target_link_libraries(vom_stats_test vom)
+ endif()
+endif()