1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-04-18 17:24:03 +03:00
mvfst/quic/codec/CMakeLists.txt
Joseph Beshay c6d8f76e67 Refactor AckScheduler to use it in both PacketScheduler and PacketRebuilder
Summary: The logic for deciding which ACK type to write was duplicated in QuicPacketScheduler and QuicPacketRebuilder. This refactors the logic out into a separate QuicAckScheduler so it can be tested for correction and reused in both places.

Reviewed By: sharmafb

Differential Revision: D69933311

fbshipit-source-id: e4f45688a5d258dd2a57f9f7844407f3efad5f49
2025-02-24 12:32:50 -08:00

273 lines
5.0 KiB
CMake

# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
add_library(
mvfst_codec_types
DefaultConnectionIdAlgo.cpp
PacketNumber.cpp
QuicConnectionId.cpp
QuicInteger.cpp
Types.cpp
)
set_property(TARGET mvfst_codec_types PROPERTY VERSION ${PACKAGE_VERSION})
target_include_directories(
mvfst_codec_types PUBLIC
$<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}>
$<INSTALL_INTERFACE:include/>
)
target_compile_options(
mvfst_codec_types
PRIVATE
${_QUIC_COMMON_COMPILE_OPTIONS}
)
add_dependencies(
mvfst_codec_types
mvfst_constants
mvfst_exception
)
target_link_libraries(
mvfst_codec_types PUBLIC
Folly::folly
mvfst_bufutil
mvfst_constants
mvfst_exception
PRIVATE
${Boost_LIBRARIES}
)
add_library(
mvfst_codec_decode
Decode.cpp
)
set_property(TARGET mvfst_codec_decode PROPERTY VERSION ${PACKAGE_VERSION})
target_include_directories(
mvfst_codec_decode PUBLIC
$<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}>
$<INSTALL_INTERFACE:include/>
)
target_compile_options(
mvfst_codec_decode
PRIVATE
${_QUIC_COMMON_COMPILE_OPTIONS}
)
add_dependencies(
mvfst_codec_decode
mvfst_codec_types
mvfst_exception
)
target_link_libraries(
mvfst_codec_decode PUBLIC
Folly::folly
mvfst_codec_types
mvfst_exception
)
add_library(
mvfst_codec_packet_number_cipher
PacketNumberCipher.cpp
)
set_property(TARGET mvfst_codec_packet_number_cipher PROPERTY VERSION ${PACKAGE_VERSION})
target_include_directories(
mvfst_codec_packet_number_cipher PUBLIC
$<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}>
$<INSTALL_INTERFACE:include/>
)
target_compile_options(
mvfst_codec_packet_number_cipher
PRIVATE
${_QUIC_COMMON_COMPILE_OPTIONS}
)
add_dependencies(
mvfst_codec_packet_number_cipher
mvfst_codec_types
mvfst_codec_decode
)
target_link_libraries(
mvfst_codec_packet_number_cipher PUBLIC
Folly::folly
mvfst_codec_types
mvfst_codec_decode
)
add_library(
mvfst_codec_pktbuilder
QuicPacketBuilder.cpp
)
set_property(TARGET mvfst_codec_pktbuilder PROPERTY VERSION ${PACKAGE_VERSION})
target_include_directories(
mvfst_codec_pktbuilder PUBLIC
$<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}>
$<INSTALL_INTERFACE:include/>
)
target_compile_options(
mvfst_codec_pktbuilder
PRIVATE
${_QUIC_COMMON_COMPILE_OPTIONS}
)
add_dependencies(
mvfst_codec_pktbuilder
mvfst_codec_types
mvfst_handshake
)
target_link_libraries(
mvfst_codec_pktbuilder PUBLIC
Folly::folly
mvfst_codec_types
mvfst_handshake
)
add_library(
mvfst_codec_pktrebuilder
QuicPacketRebuilder.cpp
)
set_property(TARGET mvfst_codec_pktrebuilder PROPERTY VERSION ${PACKAGE_VERSION})
target_include_directories(
mvfst_codec_pktrebuilder PUBLIC
$<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}>
$<INSTALL_INTERFACE:include/>
)
target_compile_options(
mvfst_codec_pktrebuilder
PRIVATE
${_QUIC_COMMON_COMPILE_OPTIONS}
)
add_dependencies(
mvfst_codec_pktrebuilder
mvfst_ack_scheduler
mvfst_codec
mvfst_codec_pktbuilder
mvfst_flowcontrol
mvfst_state_machine
mvfst_state_simple_frame_functions
mvfst_state_stream_functions
)
target_link_libraries(
mvfst_codec_pktrebuilder PUBLIC
Folly::folly
mvfst_ack_scheduler
mvfst_codec
mvfst_codec_pktbuilder
mvfst_flowcontrol
mvfst_state_machine
mvfst_state_simple_frame_functions
mvfst_state_stream_functions
)
add_library(
mvfst_codec
QuicHeaderCodec.cpp
QuicReadCodec.cpp
QuicWriteCodec.cpp
)
set_property(TARGET mvfst_codec PROPERTY VERSION ${PACKAGE_VERSION})
target_include_directories(
mvfst_codec PUBLIC
$<BUILD_INTERFACE:${QUIC_FBCODE_ROOT}>
$<INSTALL_INTERFACE:include/>
)
target_compile_options(
mvfst_codec
PRIVATE
${_QUIC_COMMON_COMPILE_OPTIONS}
)
add_dependencies(
mvfst_codec
mvfst_bufutil
mvfst_constants
mvfst_codec_decode
mvfst_codec_types
mvfst_codec_pktbuilder
mvfst_exception
mvfst_handshake
)
target_link_libraries(
mvfst_codec PUBLIC
Folly::folly
mvfst_constants
mvfst_codec_decode
mvfst_codec_types
mvfst_exception
mvfst_handshake
)
file(
GLOB_RECURSE QUIC_API_HEADERS_TOINSTALL
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
*.h
)
list(FILTER QUIC_API_HEADERS_TOINSTALL EXCLUDE REGEX test/)
foreach(header ${QUIC_API_HEADERS_TOINSTALL})
get_filename_component(header_dir ${header} DIRECTORY)
install(FILES ${header} DESTINATION include/quic/codec/${header_dir})
endforeach()
install(
TARGETS mvfst_codec_types
EXPORT mvfst-exports
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(
TARGETS mvfst_codec_decode
EXPORT mvfst-exports
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(
TARGETS mvfst_codec_pktbuilder
EXPORT mvfst-exports
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(
TARGETS mvfst_codec_pktrebuilder
EXPORT mvfst-exports
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(
TARGETS mvfst_codec_packet_number_cipher
EXPORT mvfst-exports
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(
TARGETS mvfst_codec
EXPORT mvfst-exports
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
add_subdirectory(test)