sccn / liblsl

C++ lsl library for multi-modal time-synched data transmission over the local network
Other
108 stars 63 forks source link

Where is the "LSLTargets.cmake"? #59

Closed xpekfdls closed 3 years ago

xpekfdls commented 4 years ago

When I tried to build LSL, it made a compile error. (I followed this instruction : https://github.com/sccn/labstreaminglayer/wiki/INSTALL @In tree builds)

CMake Error at LSL/liblsl/cmake/LSLConfig.cmake:1 (include): include could not find load file:

D:/labstreaminglayer/LSL/liblsl/cmake/LSLTargets.cmake

but, there're no LSLTargets.cmake in liblsl.

Here's the code in LSLConfig.cmake.

include("${CMAKE_CURRENT_LIST_DIR}/LSLTargets.cmake")

What can I do to solve it?

Thanks,

tstenner commented 4 years ago

It's created automatically here.

The in-tree-build isn't the recommended way any more, but it should work anyway.

Which apps are you trying to build?

xpekfdls commented 4 years ago

@tstenner Thanks for your reply.

I'm trying to just follow the "in tree builds" instruction to build LSL library and all apps(especially LabRecorder).

Here's what I did.

  1. install CMake 3.16.4, Boost 1.66.0, Qt 5.14.1, Visual Studio 2017

  2. git clone https://github.com/sccn/labstreaminglayer.git

  3. cd /path/to/labstreaminglayer

  4. cmake .. -G "Visual Studio 15 2017 Win64" -DQt5_DIR=D:\Qt\5.14.1\msvc2017_64\lib\cmake\Qt5 -DBOOST_ROOT=D:\boost_1_66_0 -DLSLAPPS_LabRecorder=ON -DLSLAPPS_XDFBrowser=ON -DLSLAPPS_OpenVR=ON

I have only little knowledge about handling C project, so I'm not fully understanding the each options. Do I need to change something or edit?

Thanks,

tstenner commented 4 years ago

I've pushed an experimental commit (https://github.com/sccn/labstreaminglayer/tree/intree_113), couuld you check this branch out, delete the build dir and try it again?

xpekfdls commented 4 years ago

@tstenner Thanks, I pulled your last commit and it succeeded.

  1. cd /path/to/labstreaminglayer
  2. cmake -S . -B build -G "Visual Studio 15 2017 Win64" -DQt5_DIR=D:\Qt\5.14.1\msvc2017_64\lib\cmake\Qt5 -DBOOST_ROOT=D:\boost_1_66_0

-- Installing Components: liblsl -- Configuring done -- Generating done -- Build files have been written to: D:/labstreaminglayer/build

However, when I build with "Apps" option(-DLSLAPPS_LabRecorder=ON), I got some errors.

e.g. CMake Error at Apps/LabRecorder/Findliblsl.cmake:43 (message): Neither precompiled libls nor liblsl source found Call Stack (most recent call first): Apps/LabRecorder/CMakeLists.txt:7 (include)

Is it related to the previous problem? If not I'll close this issue and try to find another solution.

tstenner commented 4 years ago

Same problem, different symptom :-) You could cd to Apps/LabRecorder and run git fetch origin ci; git checkout ci and then resume the build or wait a few days until I've had a look at the problem.

tstenner commented 3 years ago

I just built an in-tree build an can't reproduce this any more. Please re-open if you still have the issue.