aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2020-08-17 15:13:36 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2020-08-17 15:13:36 +0200
commit3e36af0431cc5ec9d6c4176eb280386e557a0d40 (patch)
treec7584a452627c325393aa28f3b75cc05626d071a /meson.build
parent080b88a018e0cca01d3e89ef264173c332ab4eeb (diff)
parent7a8615fa97cd2a3fae877665855bf7f5caf6bcc1 (diff)
downloadlibnitrokey-3e36af0431cc5ec9d6c4176eb280386e557a0d40.tar.gz
libnitrokey-3e36af0431cc5ec9d6c4176eb280386e557a0d40.tar.bz2
Merge branch '183-feat-add-freebsd-build-support'
Add support for building on FreeBSD Fixes #183
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 10 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index c758a7a..8a51b66 100644
--- a/meson.build
+++ b/meson.build
@@ -26,7 +26,11 @@ if get_option('offline-tests')
add_project_arguments(c.get_supported_arguments(test_cflags), language : 'c')
endif
-dep_hidapi = dependency('hidapi-libusb')
+if target_machine.system() == 'freebsd'
+ dep_hidapi = dependency('hidapi')
+else
+ dep_hidapi = dependency('hidapi-libusb')
+endif
inc_libnitrokey = include_directories('libnitrokey')
libnitrokey_args = []
@@ -113,7 +117,11 @@ pkg.generate(
install : true,
)
-dep_udev = dependency('udev')
+if target_machine.system() == 'freebsd'
+ dep_udev = dependency('libudev')
+else
+ dep_udev = dependency('udev')
+endif
install_data(
'data/41-nitrokey.rules',
install_dir : '@0@/rules.d'.format(dep_udev.get_pkgconfig_variable('udevdir')),