File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22% For Octave on Linux, you need the package liboctave-dev installed
33% You also need the liblsl64 binary in the bin folder and a configured
44% C compiler (mex -setup)
5- binarypath = fullfile(fileparts(mfilename(' fullpath' )), ' bin' );
6- if ispc
7- if exist(fullfile(binarypath , ' liblsl64.lib' ), ' file' )
8- libs = {' -llsl64' };
9- elseif exist(fullfile(binarypath , ' lsl.lib' ), ' file' )
10- libs = {' -llsl' };
11- else
12- error(' Neither liblsl64.lib nor lsl.lib found in bin/' );
13- end
14- elseif ismac
15- if exist(fullfile(binarypath , ' liblsl64.dylib' ), ' file' )
16- libs = {' -llsl64' };
17- elseif exist(fullfile(binarypath , ' liblsl.dylib' ), ' file' )
18- libs = {' -llsl' };
19- end
20- elseif isunix
21- libs = {' -llsl64' ,' -ldl' };
5+ libs = {};
6+ lsl_fname = lsl_get_dll();
7+ if contains(lsl_fname , ' 32' )
8+ libs{end + 1 } = ' -llsl32' ;
9+ elseif contains(lsl_fname , ' 64' )
10+ libs{end + 1 } = ' -llsl64' ;
2211else
23- libs = {' -llsl64' };
12+ libs{end + 1 } = ' -llsl' ;
13+ end
14+ if isunix
15+ libs{end + 1 } = ' -ldl' ;
2416end
2517
2618ext = [' .' mexext ];
Original file line number Diff line number Diff line change 4848 new_sopath = fullfile(binarypath , ' lsl.dll' );
4949 elseif ismac && exist(fullfile(binarypath , ' liblsl.dylib' ), ' file' )
5050 new_sopath = fullfile(binarypath , ' liblsl.dylib' );
51+ elseif exist(' /usr/lib/liblsl.so' , ' file' )
52+ new_sopath = fullfile(' /usr/lib/liblsl.so' );
5153 else
5254 new_sopath = fullfile(' /usr/lib/' , so_fname );
5355 end
9294 [~ , lib_ix ] = min(cellfun(@length , {dylib_list .name }));
9395 lsl_fname = fullfile(dylib_list(lib_ix ).folder, dylib_list(lib_ix ).name);
9496 elseif isunix
95- error([' Automatic extraction of debian package not yet supported. ' , ...
96- ' Please install manually: ' fullfile(binarypath , liblsl_url_fname )]);
97+ error([' liblsl debian package must be installed manually: ' , ...
98+ ' sudo dpkg -i ' fullfile(binarypath , liblsl_url_fname )]);
9799 end
98100end
99101
You can’t perform that action at this time.
0 commit comments