Skip to content

Commit

Permalink
Fixed loading of libiio on non-Windows systems where find_library sha…
Browse files Browse the repository at this point in the history
…ll find it in the path if the specified name is 'iio'.

Signed-off-by: Matej Kenda <[email protected]>
  • Loading branch information
matejk committed Jan 7, 2020
1 parent 1036e51 commit 8a82417
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bindings/python/iio.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ class _Buffer(Structure):

if 'Windows' in _system():
_iiolib = 'libiio.dll'
elif 'Darwin' in _system():
_iiolib = 'iio'
else:
_iiolib = 'libiio.so.0'
# Non-windows, possibly Posix system
_iiolib = 'iio'

_lib = _cdll(find_library(_iiolib), use_errno = True, use_last_error = True)

Expand Down

0 comments on commit 8a82417

Please sign in to comment.