diff options
author | Richard Hughes <richard@hughsie.com> | 2019-11-23 12:28:43 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2019-11-23 20:16:09 +0000 |
commit | 43b327a1e213aff00833842c455a796a068077cd (patch) | |
tree | b71015f44878c8de6bc7fbb1096b7d3b32d67b15 | |
parent | 8836a499232aaed11b1f00db861044b4dcd9d5fc (diff) | |
download | gusb-43b327a1e213aff00833842c455a796a068077cd.tar.gz |
trivial: Allow compiling as a subproject
-rw-r--r-- | gusb/meson.build | 9 | ||||
-rw-r--r-- | meson.build | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gusb/meson.build b/gusb/meson.build index 8415bf3..357a845 100644 --- a/gusb/meson.build +++ b/gusb/meson.build @@ -68,6 +68,15 @@ gusb = shared_library( install : true ) +gusb_dep = declare_dependency( + link_with : gusb, + include_directories : [ + root_incdir, + lib_incdir, + ], + dependencies : gusb_deps +) + pkgg = import('pkgconfig') pkgg.generate( libraries : gusb, diff --git a/meson.build b/meson.build index 88ca30c..62b974f 100644 --- a/meson.build +++ b/meson.build @@ -88,7 +88,7 @@ foreach arg: test_link_args global_link_args += arg endif endforeach -add_global_link_arguments( +add_project_link_arguments( global_link_args, language: 'c' ) @@ -96,6 +96,11 @@ add_global_link_arguments( libgio = dependency('gio-2.0', version : '>= 2.44.0') libusb = dependency('libusb-1.0', version : '>= 1.0.19') +gusb_deps = [ + libgio, + libusb, +] + gnome = import('gnome') add_project_arguments('-DGUSB_COMPILATION', language: 'c') |