labstreaminglayer / AppTemplate_cpp_qt

An example application to stream data from a device via the Labstreaminglayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change (or add-to) default LSL_INSTALL_ROOT

cboulay opened this issue · comments

The template CMakeLists.txt lines here searches for LSLConfig.cmake in ../../LSL/liblsl/build/install. This only works if liblsl was built out-of-tree. We can add support for liblsl being built within-tree by adding ../../build/install to the list of LSL_INSTALL_ROOT.

Am I understanding this correctly?

Yes and no. With in tree builds the root CMakelists.txt will be read first, and it includes the liblsl CMakeLists.txt before the Apps so by the time the app CMakeLists is included, the LSL::lsl target is already known (if(NOT TARGET LSL::lsl) here so LSLConfig.cmake isn't needed anymore.

I'm currently using in-tree builds to build liblsl and some of the core apps, then I develop new apps out-of-tree. It's probably a corner case, but it should be easy to support with the suggested change. I don't expect adding another dir will break anything but I'd just like confirmation. I've spent the past couple days in dll-hell so I'm especially hesitant to create problems without asking.

I'd rather not add it because even if it's just another directory, I'd like to keep the necessary boilerplate to find the lsl library as short as possible and it would muddy the distinction between in- and out of tree builds. I'll try to think of a better solution for your problem until Thursday.