aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThibault Payet <monwarez@gmail.com>2020-08-19 18:22:55 +0200
committerThibault Payet <monwarez@gmail.com>2020-08-19 18:54:21 +0200
commitad04be95f8baea5818919eb27e78c2926733a8cb (patch)
tree8479d71e32e802280cd36c0f8d7d4a0413e89b47 /meson.build
parent3e36af0431cc5ec9d6c4176eb280386e557a0d40 (diff)
downloadlibnitrokey-ad04be95f8baea5818919eb27e78c2926733a8cb.tar.gz
libnitrokey-ad04be95f8baea5818919eb27e78c2926733a8cb.tar.bz2
Configure libnitrokey-1.pc with hidapi on FreeBSD and with hidapi-libusb on other platform
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 11 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 8a51b66..58abb1b 100644
--- a/meson.build
+++ b/meson.build
@@ -107,12 +107,22 @@ ext_libnitrokey = declare_dependency(
include_directories : inc_libnitrokey,
)
+if meson.version().version_compare('>= 0.48.0')
+ dep_hidapi_name = dep_hidapi.name()
+else
+ if target_machine.system() == 'freebsd'
+ dep_hidapi_name = 'hidapi'
+ else
+ dep_hidapi_name = 'hidapi-libusb'
+ endif
+endif
+
pkg.generate(
name : meson.project_name(),
filebase : 'libnitrokey-1',
libraries : libnitrokey,
version : meson.project_version(),
- requires_private : 'hidapi-libusb',
+ requires_private : dep_hidapi_name,
description : 'Library for communicating with Nitrokey in a clean and easy manner',
install : true,
)