sccn / liblsl

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

CMake: add LSLCMake functions to exported configuration #53

Closed tstenner closed 4 years ago

tstenner commented 4 years ago

For #47, put the exported targets into a separate cmake file that gets included alongside the LSLCMake.cmake helper functions by find_package.

Suggested usage in apps:

find_package(LSL 1.13.0 REQUIRED
    HINTS ${LSL_INSTALL_ROOT}
    "${CMAKE_CURRENT_LIST_DIR}/../../LSL/liblsl/build/"
    "${CMAKE_CURRENT_LIST_DIR}/../../LSL/liblsl/build/install"
    PATH_SUFFIXES share/LSL
)

Tested:

tstenner commented 4 years ago

The Travis CI OS X 10.12 build timed out for some reason, but the other CIs are happy.

Unzipping the liblsl package built by the CI and giving the path to it as -DLSL_INSTALL_ROOT=/tmp/liblsl/ worked; one other things that's finally possible is building liblsl without installing in and giving the path to the liblsl build dir. Other than that the code to find liblsl is a lot shorter, so we don't even need Findliblsl.cmake any more.