Fix compilation issues with vrtsim taps client
Fix two issues regarding vrtsims taps client implementation: - Incorrect #define used to enable taps socket handling - flatbuffers package name changing between ubuntu versions
This commit is contained in:
@@ -26,6 +26,14 @@ if (OAI_VRTSIM_TAPS_CLIENT)
|
||||
|
||||
add_library(taps_client taps_client.cpp ${TAPS_API_HEADER})
|
||||
target_include_directories(taps_client PUBLIC .)
|
||||
find_package(Flatbuffers REQUIRED)
|
||||
find_package(FlatBuffers QUIET)
|
||||
if(NOT FlatBuffers_FOUND)
|
||||
# Fall back to lowercase (Ubuntu 22.04)
|
||||
find_package(Flatbuffers REQUIRED)
|
||||
set(FLATBUFFERS_TARGET flatbuffers)
|
||||
else()
|
||||
set(FLATBUFFERS_TARGET flatbuffers::flatbuffers)
|
||||
endif()
|
||||
target_link_libraries(taps_client PUBLIC ${FLATBUFFERS_TARGET})
|
||||
target_link_libraries(taps_client PUBLIC flatbuffers taps_api SIMU nanomsg)
|
||||
endif()
|
||||
|
||||
@@ -189,13 +189,13 @@ static void vrtsim_readconfig(vrtsim_state_t *vrtsim_state)
|
||||
} else {
|
||||
AssertFatal(false, "Invalid role configuration\n");
|
||||
}
|
||||
#ifdef ENABLE_TAPS_CLIENT
|
||||
#ifdef OAI_VRTSIM_TAPS_CLIENT
|
||||
if (vrtsim_state->taps_socket) {
|
||||
LOG_A(HW, "VRTSIM: will use taps socket %s\n", vrtsim_state->taps_socket);
|
||||
}
|
||||
#else
|
||||
if (vrtsim_state->taps_socket) {
|
||||
AssertFatal(false, "Invalid configuration: Build with ENABLE_TAPS_CLIENT to use taps socket\n");
|
||||
AssertFatal(false, "Invalid configuration: Build with OAI_VRTSIM_TAPS_CLIENT to use taps socket\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user