diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index be95237..c551ff6 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -24,3 +24,4 @@ add_subdirectory(./libwebp) add_subdirectory(./qoi) add_subdirectory(./sdl_image) +add_subdirectory(./spscqueue) diff --git a/external/spscqueue/CMakeLists.txt b/external/spscqueue/CMakeLists.txt new file mode 100644 index 0000000..7a17be8 --- /dev/null +++ b/external/spscqueue/CMakeLists.txt @@ -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}") + diff --git a/src/content/SPSCQueue.h b/external/spscqueue/SPSCQueue.h similarity index 100% rename from src/content/SPSCQueue.h rename to external/spscqueue/SPSCQueue.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a7c5179..f8e337f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 diff --git a/src/content/frame_stream2.hpp b/src/content/frame_stream2.hpp index 114a98f..2186b40 100644 --- a/src/content/frame_stream2.hpp +++ b/src/content/frame_stream2.hpp @@ -6,7 +6,7 @@ #include #include -#include "./SPSCQueue.h" +#include // Frames ofen consist of: // - seq id // incremental sequential id, gaps in ids can be used to detect loss