Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@ set (CMAKE_POLICY_VERSION_MINIMUM 3.5)
### Define the project name and version
### Version will be added to version output of apps and library
project(laps
VERSION 0.18.12
VERSION 0.18.15
DESCRIPTION "Latency Aware Publish/Subscribe"
LANGUAGES CXX)

##
## CPM
##
if (NOT DEFINED ENV{IDF_PATH})
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
endif()

include(CPM)

##

configure_file( version_config.h.in ${CMAKE_BINARY_DIR}/generated/version_config.h )
include_directories( ${CMAKE_BINARY_DIR}/generated/ ${CMAKE_CURRENT_SOURCE_DIR}/src)

Expand All @@ -43,6 +54,20 @@ endif()
###
add_subdirectory(dependencies)

# quicr/log.h picks between std::format and fmt on this definition, which libquicr only defines for its own
# sources. The relay logs through quicr::Logger, so it has to make the same choice libquicr did.
if(HAS_STD_VFORMAT)
add_compile_definitions(QUICR_HAVE_STD_FORMAT)
endif()

# spdlog compiles a bundled copy of fmt by default. libquicr also links fmt::fmt
# when std::vformat is unavailable (typical on libstdc++ / GCC < 13), so linking
# both into lapsRelay produces duplicate fmt::v12 symbols on Linux.
if(TARGET fmt::fmt)
set(SPDLOG_FMT_EXTERNAL ON CACHE BOOL "Use external fmt; avoid duplicate symbols with libquicr" FORCE)
endif()
CPMAddPackage("gh:gabime/spdlog@1.17.0")

###
### Build relay
###
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ WORKDIR /ws

COPY ./Makefile ./
COPY ./CMakeLists.txt ./
COPY ./cmake ./cmake
COPY ./version_config.h.in ./
COPY ./dependencies ./dependencies
COPY ./src ./src
Expand Down
24 changes: 24 additions & 0 deletions cmake/CPM.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-License-Identifier: MIT
#
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors

set(CPM_DOWNLOAD_VERSION 0.42.3)
set(CPM_HASH_SUM "a609e875fd532b067174250f6abbc3dac22fe2d64869783fb1e80bda1625c844")

if(CPM_SOURCE_CACHE)
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
else()
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
endif()

# Expand relative path. This is important if the provided path contains a tilde (~)
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)

file(DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM}
)

include(${CPM_DOWNLOAD_LOCATION})
1 change: 1 addition & 0 deletions debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ WORKDIR /ws

COPY ./Makefile ./
COPY ./CMakeLists.txt ./
COPY ./cmake ./cmake
COPY ./version_config.h.in ./
COPY ./dependencies ./dependencies
COPY ./src ./src
Expand Down
1 change: 1 addition & 0 deletions debian.clang.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ WORKDIR /ws

COPY ./Makefile ./
COPY ./CMakeLists.txt ./
COPY ./cmake ./cmake
COPY ./version_config.h.in ./
COPY ./dependencies ./dependencies
COPY ./src ./src
Expand Down
2 changes: 1 addition & 1 deletion dependencies/libquicr
Submodule libquicr updated 84 files
+4 −4 .github/workflows/cmake.yml
+19 −4 .pre-commit-config.yaml
+35 −6 CMakeLists.txt
+1 −1 Doxyfile
+1 −14 Makefile
+2 −8 README.md
+2 −2 REUSE.toml
+0 −1 benchmark/hash.cpp
+0 −1 benchmark/priority_queue.cpp
+0 −2 c-bridge/CMakeLists.txt
+0 −3 c-bridge/include/quicr/quicr_bridge.h
+95 −58 c-bridge/src/quicr_bridge.cpp
+1 −1 dependencies/picoquic
+1 −1 dependencies/timeq
+81 −0 docs/api-guide.md
+1 −1 examples/CMakeLists.txt
+0 −0 examples/dependencies/.clang-format-ignore
+0 −0 examples/dependencies/oss/cxxopts.hpp
+7 −12 examples/qclient/CMakeLists.txt
+462 −308 examples/qclient/client.cpp
+0 −0 examples/qclient/helper_functions.h
+2 −0 examples/qclient/signal_handler.h
+0 −146 include/quicr/client.h
+0 −33 include/quicr/common.h
+36 −1 include/quicr/config.h
+228 −0 include/quicr/connection.h
+1 −1 include/quicr/containers/data_storage.h
+2 −2 include/quicr/containers/safe_queue.h
+44 −0 include/quicr/errors.h
+0 −283 include/quicr/handlers/base_track_handler.h
+12 −1 include/quicr/handlers/publish_fetch_handler.h
+9 −21 include/quicr/handlers/publish_namespace_handler.h
+21 −7 include/quicr/handlers/publish_track_handler.h
+9 −20 include/quicr/handlers/subscribe_namespace_handler.h
+4 −4 include/quicr/handlers/subscribe_track_handler.h
+209 −0 include/quicr/handlers/track_handler.h
+114 −0 include/quicr/log.h
+0 −18 include/quicr/messages/ctrl_message_types.h
+0 −1 include/quicr/messages/messages.h
+280 −3 include/quicr/metrics.h
+94 −0 include/quicr/reply.h
+284 −866 include/quicr/session.h
+375 −0 include/quicr/session_callbacks.h
+76 −0 include/quicr/session_manager.h
+153 −245 include/quicr/transport.h
+0 −269 include/quicr/transport_metrics.h
+0 −7 include/quicr/utilities/bytes.h
+100 −0 include/quicr/utilities/expected.h
+27 −0 include/quicr/utilities/format.h
+14 −4 src/CMakeLists.txt
+0 −50 src/base_track_handler.cpp
+105 −0 src/connection.cpp
+0 −14 src/ctrl_message_types.cpp
+9 −12 src/fetch_track_handler.cpp
+9 −11 src/joining_fetch_handler.cpp
+15 −0 src/log.cpp
+4 −4 src/messages.cpp
+147 −0 src/picoquic_connection.cpp
+273 −0 src/picoquic_connection.h
+33 −18 src/publish_fetch_handler.cpp
+11 −48 src/publish_namespace_handler.cpp
+47 −54 src/publish_track_handler.cpp
+1,510 −1,920 src/session.cpp
+138 −0 src/session_callbacks.cpp
+292 −0 src/session_manager.cpp
+74 −0 src/stream.h
+4 −27 src/subscribe_namespace_handler.cpp
+50 −98 src/subscribe_track_handler.cpp
+26 −0 src/track_handler.cpp
+17 −25 src/transport.cpp
+1,486 −1,490 src/transport_picoquic.cpp
+164 −291 src/transport_picoquic.h
+6 −3 test/CMakeLists.txt
+1 −0 test/integration_test/CMakeLists.txt
+649 −152 test/integration_test/integration_test.cpp
+15 −14 test/integration_test/test_client.cpp
+51 −11 test/integration_test/test_client.h
+136 −136 test/integration_test/test_server.cpp
+178 −91 test/integration_test/test_server.h
+1 −1 test/metrics.cpp
+108 −0 test/picoquic_connection.cpp
+0 −38 test/session.cpp
+0 −1 test/track_handlers.cpp
+0 −1 test/track_namespace.cpp
1 change: 1 addition & 0 deletions healthcheck.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN apk add --no-cache \
WORKDIR /ws

COPY ./CMakeLists.txt ./
COPY ./cmake ./cmake
COPY ./version_config.h.in ./
COPY ./dependencies ./dependencies
COPY ./src ./src
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ add_executable(lapsRelay
peering/info_base.cc
)

target_link_libraries(lapsRelay PRIVATE quicr)
target_link_libraries(lapsRelay PRIVATE quicr spdlog::spdlog)
target_include_directories(lapsRelay PRIVATE ${PROJECT_SOURCE_DIR}/dependencies/oss )

target_compile_options(lapsRelay
Expand All @@ -54,7 +54,7 @@ set_target_properties(relay_health_check_lib
CXX_EXTENSIONS OFF)

add_executable(relay_health_check relay_health_check.cpp)
target_link_libraries(relay_health_check PRIVATE quicr relay_health_check_lib)
target_link_libraries(relay_health_check PRIVATE quicr spdlog::spdlog relay_health_check_lib)

target_compile_options(relay_health_check
PRIVATE
Expand Down
Loading
Loading