From 07c18f0543f5ef4475e85968fb6a208d5e01a96a Mon Sep 17 00:00:00 2001 From: Fares Schulz Date: Sat, 16 Nov 2024 10:47:44 +0000 Subject: [PATCH] Fixed issue where concurrentqueue lib is not found when using prebuild binaries --- CMakeLists.txt | 1 - Config.cmake.in | 2 ++ cmake/install.cmake | 2 ++ include/anira/scheduler/Context.h | 2 +- include/anira/scheduler/InferenceThread.h | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b66669..136bce8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,6 @@ FetchContent_Declare( FetchContent_MakeAvailable(concurrentqueue) - # ============================================================================== # Build the library # ============================================================================== diff --git a/Config.cmake.in b/Config.cmake.in index 9edb9d1..a1d0a85 100644 --- a/Config.cmake.in +++ b/Config.cmake.in @@ -5,6 +5,8 @@ message(STATUS "Configuring anira") set(ANIRA_WITH_LIBTORCH @ANIRA_WITH_LIBTORCH@) set(ANIRA_WITH_BENCHMARK @ANIRA_WITH_BENCHMARK@) +find_package(concurrentqueue REQUIRED) + # Find the dependencies if (ANIRA_WITH_LIBTORCH) find_package(Torch REQUIRED) diff --git a/cmake/install.cmake b/cmake/install.cmake index 90544c9..95937ca 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake @@ -6,9 +6,11 @@ include(GNUInstallDirs) # include the public headers of the anira library for the install target +# TODO: File PR so that the concurrentqueue library does not have to be included that way target_include_directories(${PROJECT_NAME} PUBLIC $ + $ ) # This will be problematic anyway since symbols are not found when linking the torch libraries privately diff --git a/include/anira/scheduler/Context.h b/include/anira/scheduler/Context.h index 0737b3d..8d836bf 100644 --- a/include/anira/scheduler/Context.h +++ b/include/anira/scheduler/Context.h @@ -10,7 +10,7 @@ #include "InferenceThread.h" #include "../PrePostProcessor.h" #include "../utils/HostAudioConfig.h" -#include "concurrentqueue.h" +#include #ifdef USE_LIBTORCH #include "../backends/LibTorchProcessor.h" diff --git a/include/anira/scheduler/InferenceThread.h b/include/anira/scheduler/InferenceThread.h index 2850d77..ef3a2e9 100644 --- a/include/anira/scheduler/InferenceThread.h +++ b/include/anira/scheduler/InferenceThread.h @@ -8,7 +8,7 @@ #include "../system/HighPriorityThread.h" #include "../utils/AudioBuffer.h" #include "SessionElement.h" -#include "concurrentqueue.h" +#include #ifdef __x86_64__ #include #endif