Skip to content

Commit 34719d6

Browse files
committed
CMake: Fix in-tree builds for liblsl examples
1 parent 8e257f7 commit 34719d6

File tree

2 files changed

+9
-46
lines changed

2 files changed

+9
-46
lines changed

examples/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@ cmake_minimum_required(VERSION 3.5)
22
project(Examples
33
LANGUAGES C CXX
44
VERSION 0.2.0)
5-
list(INSERT LSL_INSTALL_ROOT 0 "${CMAKE_CURRENT_LIST_DIR}/../build/install/")
6-
include(Findliblsl.cmake)
5+
find_package(LSL REQUIRED
6+
HINTS ${LSL_INSTALL_ROOT}
7+
"${CMAKE_CURRENT_LIST_DIR}/../build"
8+
"${CMAKE_CURRENT_LIST_DIR}/../out/x64-Release"
9+
PATH_SUFFIXES share/LSL)
10+
get_filename_component(LSL_PATH ${LSL_CONFIG} DIRECTORY)
11+
message(STATUS "Found LSL lib in ${LSL_PATH}")
12+
LSLAPP_Setup_Boilerplate()
13+
message(STATUS "LSL BIN DIR: ${liblsl_BINARY_DIR} & ${LIBLSL_BINARY_DIR}")
714

815
# convenience function to add an example file
916
# this creates a target, links the necessary libraries and

examples/Findliblsl.cmake

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)