Closed mchagneux closed 1 month ago
I managed to make it work by copying the lines:
file(GLOB_RECURSE INFERENCE_ENGINE_DLLS_ONNX "${ANIRA_ONNXRUNTIME_SHARED_LIB_PATH}/*.dll")
list(APPEND NECESSARY_DLLS ${INFERENCE_ENGINE_DLLS_ONNX})
file(GLOB_RECURSE INFERENCE_ENGINE_DLLS_TFLITE "${ANIRA_TENSORFLOWLITE_SHARED_LIB_PATH}/*.dll")
list(APPEND NECESSARY_DLLS ${INFERENCE_ENGINE_DLLS_TFLITE})
file(GLOB_RECURSE INFERENCE_ENGINE_DLLS_LIBTORCH "${ANIRA_LIBTORCH_SHARED_LIB_PATH}*.dll")
list(APPEND NECESSARY_DLLS ${INFERENCE_ENGINE_DLLS_LIBTORCH})
in the parent CMakeLists.txt file of my plugin. The variable NECESSARY_DLLS
only contains the anira dll when passed to a parent folder.
Hi @mchagneux, that sounds like a reasonable change! I'll look into it more closely. Thanks for reporting!
We have updated the handling of shared libraries. It is now possible to access the required shared libraries through the ANIRA_SHARED_LIBS_WIN
variable, which replaces the previously used NECESSARY_DLLS
.
A demonstration how to access them from a external project (anira as a submodule) can be found in the nn-inference-template plugin.
Hi,
When cloning anira as a subfolder and adding it with add_directory for a specific target, the .dll files associated with torch, onnx, and tensorflow are not transferred into the build artifacts. If think this has to do with PARENT_SCOPE not being set somewhere for these libs but I'm not sure. I'm using Ninja with MSVC provided from VS2022.
Thanks in advance.