Vendor MsQuic with build and install support, add DeviceManager status to configurable heartbeats, and report only enabled devices. Add the local QUIC gateway, protocol coverage, real MsQuic E2E tests, process smoke tests, and updated integration documentation.
80 lines
2.7 KiB
CMake
80 lines
2.7 KiB
CMake
if(NOT TARGET MsQuic::msquic)
|
|
message(FATAL_ERROR
|
|
"cmvr_quic_test_gateway requires the repository-local MsQuic target")
|
|
endif()
|
|
if(NOT TARGET cmvr_es::proto)
|
|
message(FATAL_ERROR "cmvr_quic_test_gateway requires cmvr_es::proto")
|
|
endif()
|
|
if(NOT TARGET cmvr_es::quic_edge_service)
|
|
message(FATAL_ERROR
|
|
"cmvr_quic_test_gateway requires cmvr_es::quic_edge_service")
|
|
endif()
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
add_library(cmvr_quic_test_gateway_lib STATIC
|
|
src/quic_test_gateway.cpp
|
|
src/media_reassembler.cpp
|
|
)
|
|
add_library(cmvr_es::quic_test_gateway ALIAS cmvr_quic_test_gateway_lib)
|
|
target_compile_features(cmvr_quic_test_gateway_lib PUBLIC cxx_std_17)
|
|
target_include_directories(cmvr_quic_test_gateway_lib
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
PRIVATE
|
|
${PROJECT_SOURCE_DIR}/cmvr-es
|
|
)
|
|
target_link_libraries(cmvr_quic_test_gateway_lib
|
|
PUBLIC
|
|
MsQuic::msquic
|
|
cmvr_es::proto
|
|
cmvr_es::quic_edge_service
|
|
Threads::Threads
|
|
)
|
|
|
|
add_executable(cmvr_quic_test_gateway src/main.cpp)
|
|
target_compile_features(cmvr_quic_test_gateway PRIVATE cxx_std_17)
|
|
target_link_libraries(cmvr_quic_test_gateway
|
|
PRIVATE cmvr_es::quic_test_gateway)
|
|
|
|
configure_file(
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/run_gateway.sh.in"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/run_cmvr_quic_test_gateway"
|
|
@ONLY)
|
|
file(CHMOD "${CMAKE_CURRENT_BINARY_DIR}/run_cmvr_quic_test_gateway"
|
|
PERMISSIONS
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
|
GROUP_READ GROUP_EXECUTE
|
|
WORLD_READ WORLD_EXECUTE)
|
|
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
target_compile_options(cmvr_quic_test_gateway_lib
|
|
PRIVATE -Wall -Wextra -Wpedantic)
|
|
target_compile_options(cmvr_quic_test_gateway
|
|
PRIVATE -Wall -Wextra -Wpedantic)
|
|
endif()
|
|
|
|
if(BUILD_TESTING)
|
|
add_executable(cmvr_quic_media_reassembler_test
|
|
tests/media_reassembler_test.cpp)
|
|
target_compile_features(cmvr_quic_media_reassembler_test PRIVATE cxx_std_17)
|
|
target_link_libraries(cmvr_quic_media_reassembler_test
|
|
PRIVATE cmvr_es::quic_test_gateway)
|
|
add_test(
|
|
NAME cmvr_quic_media_reassembler_test
|
|
COMMAND cmvr_quic_media_reassembler_test)
|
|
set_tests_properties(cmvr_quic_media_reassembler_test
|
|
PROPERTIES
|
|
LABELS "quic;unit"
|
|
TIMEOUT 10
|
|
ENVIRONMENT
|
|
"LD_LIBRARY_PATH=${CMVR_QUIC_TEST_LIBRARY_PATH}")
|
|
endif()
|
|
|
|
option(CMVR_INSTALL_QUIC_TEST_GATEWAY
|
|
"Install the development-only QUIC test gateway into output/bin"
|
|
OFF)
|
|
if(CMVR_INSTALL_QUIC_TEST_GATEWAY)
|
|
install(TARGETS cmvr_quic_test_gateway RUNTIME DESTINATION bin)
|
|
endif()
|