diff options
author | Patrick Griffis <tingping@tingping.se> | 2017-11-18 20:47:32 -0500 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2017-11-18 20:47:32 -0500 |
commit | 3e53635dfbd30acb7b11f07a6f00071e7643867f (patch) | |
tree | 1afc36b91884d53e7cbabebb1119b6fe01697e45 /plugins/sysinfo/meson.build | |
parent | 47b653cc7c981cb2a20dc2140c66d90b6f3088d0 (diff) |
sysinfo: Make libpci an optional dependency
Diffstat (limited to 'plugins/sysinfo/meson.build')
-rw-r--r-- | plugins/sysinfo/meson.build | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/sysinfo/meson.build b/plugins/sysinfo/meson.build index c589a590..5656724e 100644 --- a/plugins/sysinfo/meson.build +++ b/plugins/sysinfo/meson.build @@ -19,14 +19,17 @@ if system == 'linux' or system == 'darwin' ] if system == 'linux' - libpci = dependency('libpci') - sysinfo_deps += libpci + libpci = dependency('libpci', required: false) + if libpci.found() + sysinfo_deps += libpci + sysinfo_cargs += '-DHAVE_LIBPCI' + sysinfo_sources += 'unix/pci.c' + endif sysinfo_includes += 'unix' sysinfo_sources += [ 'unix/backend.c', 'unix/match.c', 'unix/parse.c', - 'unix/pci.c', ] picidsdir = libpci.get_pkgconfig_variable('idsdir') |