[gnome-bluetooth: 11/14] build: Fix dependencies
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth: 11/14] build: Fix dependencies
- Date: Fri, 11 Jan 2019 11:23:45 +0000 (UTC)
commit 83c6246b3f4933f81d4fafb4b4f8ca139dc569e2
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Dec 21 11:32:56 2018 +0100
build: Fix dependencies
libgnome-bluetooth expose a number of includes in their public
headers belonging to different libraries. Therefore, these libraries
are indirect dependencies of the library to be built.
With this in mind, required dependencies have been split in two
sets, one formed by public dependencies and the other by private
dependencies.
The created `pkg-config` file now also use these new sets.
docs/reference/libgnome-bluetooth/meson.build | 5 +----
lib/meson.build | 20 +++++++++++---------
meson.build | 12 ++++++------
sendto/meson.build | 8 ++------
4 files changed, 20 insertions(+), 25 deletions(-)
---
diff --git a/docs/reference/libgnome-bluetooth/meson.build b/docs/reference/libgnome-bluetooth/meson.build
index 4881142c..b31eb181 100644
--- a/docs/reference/libgnome-bluetooth/meson.build
+++ b/docs/reference/libgnome-bluetooth/meson.build
@@ -23,10 +23,7 @@ configure_file(
gnome.gtkdoc(
meson.project_name(),
main_sgml: meson.project_name() + '-docs.sgml',
- src_dir: [
- top_inc,
- lib_inc,
- ],
+ src_dir: top_inc,
dependencies: libgnome_bluetooth_dep,
scan_args: [
'--rebuild-types',
diff --git a/lib/meson.build b/lib/meson.build
index 0ef1e484..cc37fcd1 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -67,9 +67,15 @@ built_sources += gnome.gdbus_codegen(
)
deps = [
+ gio_dep,
gtk_dep,
- m_dep,
- libgbt_dep,
+]
+
+private_deps = [
+ gio_unix_dep,
+ libcanberra_gtk_dep,
+ libnotify_dep,
+ libudev_dep,
]
cflags = [
@@ -85,7 +91,7 @@ libgnome_bluetooth = shared_library(
sources: sources + built_sources,
version: libversion,
include_directories: top_inc,
- dependencies: deps,
+ dependencies: deps + private_deps + [m_dep],
c_args: cflags,
link_args: ldflags,
link_depends: symbol_map,
@@ -105,11 +111,7 @@ pkg.generate(
description: 'Widgets for Bluetooth device selection',
filebase: gnomebt_api_name,
subdirs: meson.project_name(),
- requires: [
- 'gio-2.0',
- 'gtk+-3.0',
- ],
- requires_private: 'libudev',
+ requires: deps,
variables: 'exec_prefix=${prefix}',
)
@@ -150,7 +152,7 @@ foreach name: test_names
name,
[name + '.c'] + built_sources,
include_directories: top_inc,
- dependencies: deps,
+ dependencies: deps + private_deps,
c_args: cflags,
link_with: libgnome_bluetooth,
)
diff --git a/meson.build b/meson.build
index 07b417af..ed6dc268 100644
--- a/meson.build
+++ b/meson.build
@@ -96,14 +96,14 @@ endif
add_project_arguments(common_flags + compiler_flags, language: 'c')
+gio_dep = dependency('gio-2.0')
+gio_unix_dep = dependency('gio-unix-2.0')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.12.0')
+libcanberra_gtk_dep = dependency('libcanberra-gtk3')
+libnotify_dep = dependency('libnotify', version: '>= 0.7.0')
+libudev_dep = dependency('libudev')
+
m_dep = cc.find_library('m')
-libgbt_dep = [ dependency('gio-unix-2.0'),
- dependency('gmodule-2.0'),
- dependency('libcanberra-gtk3'),
- dependency('libnotify', version: '>= 0.7.0'),
- dependency('libudev'),
-]
subdir('icons')
subdir('lib')
diff --git a/sendto/meson.build b/sendto/meson.build
index f0e8ad8f..d7604e97 100644
--- a/sendto/meson.build
+++ b/sendto/meson.build
@@ -3,12 +3,8 @@ name = 'bluetooth-sendto'
executable(
name,
'main.c',
- include_directories: [
- top_inc,
- lib_inc,
- ],
- dependencies: gtk_dep,
- link_with: libgnome_bluetooth,
+ include_directories: top_inc,
+ dependencies: libgnome_bluetooth_dep,
install: true,
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]