Skip to content

Commit

Permalink
Merge pull request labstreaminglayer#28 from labstreaminglayer/find_p…
Browse files Browse the repository at this point in the history
…refixless_dll

Forward support for dlls without lib prefix
  • Loading branch information
cboulay authored Sep 15, 2020
2 parents a134039 + 60336cb commit 349d5be
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pylsl/pylsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,16 +1195,16 @@ def find_liblsl_libraries():
else:
raise RuntimeError("unrecognized operating system:", os_name)

libbasepath = os.path.join(os.path.dirname(__file__), 'lib', 'liblsl')
for debugsuffix in ['', '-debug']:
for bitness in ['', str(8 * struct.calcsize("P"))]:
path = libbasepath + bitness + debugsuffix + libsuffix
if os.path.isfile(path):
yield path
path = util.find_library('lsl' + bitness + debugsuffix) or \
util.find_library('liblsl' + bitness + debugsuffix)
if path is not None:
yield path
libbasepath = os.path.join(os.path.dirname(__file__), 'lib')
for libprefix in ['', 'lib']:
for debugsuffix in ['', '-debug']:
for bitness in ['', str(8 * struct.calcsize("P"))]:
path = os.path.join(libbasepath, libprefix + 'lsl' + bitness + debugsuffix + libsuffix)
if os.path.isfile(path):
yield path
path = util.find_library(libprefix + 'lsl' + bitness + debugsuffix)
if path is not None:
yield path


try:
Expand Down

0 comments on commit 349d5be

Please sign in to comment.