3rd party library - find_package(Threads REQUIRED)
Posted: Wed Oct 11, 2023 7:39 pm
Hello,
I'm quite new to cmake and I'm having some issues on using an external library with IDF.
The library in question is liblsl (https://github.com/sccn/liblsl) which is a quite complex library for networking time-synchronized time-series.
One of it's requirements is threads, but for some reason I'm not making it possible for it to uses IDF's pthreads implementation.
I tried to "force" it through "find_package(Threads REQUIRED PATHS ~/esp/esp-idf/components/pthread)"
But it didn't work, resulting in:
One thing I was considering is pre-compiling liblsl and statically link it, but I'm also not sure how this would work since I would have to compile it specifically for the ESP32 framework.
I would deeply appreciate any hints or advices on how to accomplish this feat.
Thanks!
I'm quite new to cmake and I'm having some issues on using an external library with IDF.
The library in question is liblsl (https://github.com/sccn/liblsl) which is a quite complex library for networking time-synchronized time-series.
One of it's requirements is threads, but for some reason I'm not making it possible for it to uses IDF's pthreads implementation.
I tried to "force" it through "find_package(Threads REQUIRED PATHS ~/esp/esp-idf/components/pthread)"
But it didn't work, resulting in:
But I'm not sure if this is the right approach.Make Error at main/lib/liblsl/CMakeLists.txt:168 (find_package):
Could not find a package configuration file provided by "Threads" with any
of the following names:
ThreadsConfig.cmake
threads-config.cmake
Add the installation prefix of "Threads" to CMAKE_PREFIX_PATH or set
"Threads_DIR" to a directory containing one of the above files. If
"Threads" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
FAILED: build.ninja
One thing I was considering is pre-compiling liblsl and statically link it, but I'm also not sure how this would work since I would have to compile it specifically for the ESP32 framework.
I would deeply appreciate any hints or advices on how to accomplish this feat.
Thanks!