Skip to content

Commit

Permalink
Fixed issue where concurrentqueue lib is not found when using prebuil…
Browse files Browse the repository at this point in the history
…d binaries
  • Loading branch information
faressc committed Nov 16, 2024
1 parent 4637a4c commit 07c18f0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ FetchContent_Declare(

FetchContent_MakeAvailable(concurrentqueue)


# ==============================================================================
# Build the library
# ==============================================================================
Expand Down
2 changes: 2 additions & 0 deletions Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions cmake/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/concurrentqueue/moodycamel>
)

# This will be problematic anyway since symbols are not found when linking the torch libraries privately
Expand Down
2 changes: 1 addition & 1 deletion include/anira/scheduler/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "InferenceThread.h"
#include "../PrePostProcessor.h"
#include "../utils/HostAudioConfig.h"
#include "concurrentqueue.h"
#include <concurrentqueue.h>

#ifdef USE_LIBTORCH
#include "../backends/LibTorchProcessor.h"
Expand Down
2 changes: 1 addition & 1 deletion include/anira/scheduler/InferenceThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "../system/HighPriorityThread.h"
#include "../utils/AudioBuffer.h"
#include "SessionElement.h"
#include "concurrentqueue.h"
#include <concurrentqueue.h>
#ifdef __x86_64__
#include <immintrin.h>
#endif
Expand Down

0 comments on commit 07c18f0

Please sign in to comment.