move queue code to external

This commit is contained in:
Green Sky 2024-08-11 14:01:03 +02:00
parent 93d65ead89
commit 4ff9386398
No known key found for this signature in database
5 changed files with 13 additions and 1 deletions

View File

@ -24,3 +24,4 @@ add_subdirectory(./libwebp)
add_subdirectory(./qoi)
add_subdirectory(./sdl_image)
add_subdirectory(./spscqueue)

9
external/spscqueue/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
add_library(SPSCQueue INTERFACE
./SPSCQueue.h
)
target_compile_features(SPSCQueue INTERFACE cxx_std_17)
target_include_directories(SPSCQueue INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")

View File

@ -148,6 +148,8 @@ target_link_libraries(tomato PUBLIC
libwebpmux # the f why (needed for anim encode)
qoi
SDL3_image::SDL3_image
SPSCQueue
)
# probably not enough

View File

@ -6,7 +6,7 @@
#include <vector>
#include <mutex>
#include "./SPSCQueue.h"
#include <SPSCQueue.h>
// Frames ofen consist of:
// - seq id // incremental sequential id, gaps in ids can be used to detect loss