summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gnome-bluetooth-ui.map9
-rw-r--r--lib/gnome-bluetooth.map9
-rw-r--r--lib/meson.build87
-rw-r--r--lib/test-pin.c2
-rw-r--r--meson.build1
-rw-r--r--sendto/meson.build2
-rw-r--r--tests/meson.build4
7 files changed, 78 insertions, 36 deletions
diff --git a/lib/gnome-bluetooth-ui.map b/lib/gnome-bluetooth-ui.map
new file mode 100644
index 00000000..70adc806
--- /dev/null
+++ b/lib/gnome-bluetooth-ui.map
@@ -0,0 +1,9 @@
+{
+global:
+ bluetooth_settings_widget_get_type;
+ bluetooth_settings_widget_new;
+ bluetooth_settings_widget_get_default_adapter_powered;
+ bluetooth_settings_widget_set_default_adapter_powered;
+local:
+ *;
+};
diff --git a/lib/gnome-bluetooth.map b/lib/gnome-bluetooth.map
index 94e97603..02e00cb2 100644
--- a/lib/gnome-bluetooth.map
+++ b/lib/gnome-bluetooth.map
@@ -34,15 +34,6 @@ global:
bluetooth_agent_set_display_passkey_func;
bluetooth_agent_set_display_pincode_func;
bluetooth_agent_set_authorize_service_func;
- bluetooth_settings_widget_get_type;
- bluetooth_settings_widget_new;
- bluetooth_settings_widget_get_default_adapter_powered;
- bluetooth_settings_widget_set_default_adapter_powered;
- bluetooth_pairing_dialog_new;
- bluetooth_pairing_dialog_get_type;
- bluetooth_pairing_dialog_set_mode;
- bluetooth_pairing_dialog_get_mode;
- bluetooth_pairing_dialog_set_pin_entered;
local:
*;
};
diff --git a/lib/meson.build b/lib/meson.build
index 978cd596..8940d928 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -3,13 +3,16 @@ lib_inc = include_directories('.')
enum_headers = files('bluetooth-enums.h')
headers = enum_headers + files(
+ 'bluetooth-device.h',
'bluetooth-client.h',
- 'bluetooth-settings-widget.h',
'bluetooth-utils.h',
)
+ui_headers = files(
+ 'bluetooth-settings-widget.h',
+)
install_headers(
- headers,
+ ui_headers,
subdir: gnomebt_api_name,
)
@@ -17,16 +20,17 @@ sources = files(
'bluetooth-agent.c',
'bluetooth-client.c',
'bluetooth-device.c',
+ 'bluetooth-utils.c',
+ 'pin.c',
+)
+
+ui_sources = sources + files(
'bluetooth-pairing-dialog.c',
'bluetooth-settings-obexpush.c',
'bluetooth-settings-row.c',
'bluetooth-settings-widget.c',
- 'bluetooth-utils.c',
- 'pin.c',
)
-built_sources = []
-
resource_data = files(
'bluetooth-pairing-dialog.ui',
'bluetooth-settings.css',
@@ -34,7 +38,7 @@ resource_data = files(
'settings.ui',
)
-built_sources += gnome.compile_resources(
+ui_built_sources = gnome.compile_resources(
'bluetooth-settings-resources',
'bluetooth.gresource.xml',
c_name: 'bluetooth_settings',
@@ -44,13 +48,11 @@ built_sources += gnome.compile_resources(
enum_sources = gnome.mkenums_simple(
'gnome-bluetooth-enum-types',
- sources : headers,
+ sources : enum_headers,
)
-built_sources += enum_sources
client = 'bluetooth-client'
-
-built_sources += gnome.gdbus_codegen(
+client_built_sources = gnome.gdbus_codegen(
client + '-glue',
client + '.xml',
interface_prefix: 'org.bluez',
@@ -58,15 +60,26 @@ built_sources += gnome.gdbus_codegen(
deps = [
gio_dep,
+]
+
+private_deps = [
+ gio_unix_dep,
+ libudev_dep,
+ m_dep,
+]
+
+ui_deps = [
+ gio_dep,
gtk_dep,
libadwaita_dep,
]
-private_deps = [
+ui_private_deps = [
gio_unix_dep,
gsound_dep,
libnotify_dep,
libudev_dep,
+ m_dep,
]
cflags = [
@@ -79,10 +92,10 @@ ldflags = cc.get_supported_link_arguments('-Wl,--version-script,' + symbol_map)
libgnome_bluetooth = shared_library(
gnomebt_api_name,
- sources: sources + built_sources,
+ sources: sources + enum_sources + client_built_sources,
version: libversion,
include_directories: top_inc,
- dependencies: deps + private_deps + [m_dep],
+ dependencies: deps + private_deps,
c_args: cflags,
link_args: ldflags,
link_depends: symbol_map,
@@ -99,7 +112,7 @@ pkg.generate(
libraries: libgnome_bluetooth,
version: gnomebt_version,
name: gnomebt_api_name,
- description: 'Widgets for Bluetooth device selection',
+ description: 'Bluetooth libraries for gnome-shell',
filebase: gnomebt_api_name,
subdirs: gnomebt_api_name,
requires: deps,
@@ -110,9 +123,7 @@ if enable_gir
gir_sources = sources + headers
gir_incs = [
- 'GModule-2.0',
- 'GObject-2.0',
- 'Gtk-4.0',
+ 'Gio-2.0',
]
gnome.generate_gir(
@@ -130,9 +141,8 @@ if enable_gir
gnomebt_priv_gir = gnome.generate_gir(
libgnome_bluetooth,
sources: gir_sources + [
- 'bluetooth-device.h',
- 'bluetooth-client-private.h',
'bluetooth-agent.h',
+ 'bluetooth-client-private.h',
],
nsversion: gnomebt_api_version,
namespace: 'GnomeBluetoothPriv',
@@ -144,6 +154,38 @@ if enable_gir
)
endif
+ui_symbol_map = meson.current_source_dir() / (meson.project_name() + '-ui.map')
+ui_ldflags = cc.get_supported_link_arguments('-Wl,--version-script,' + ui_symbol_map)
+
+libgnome_bluetooth_ui = shared_library(
+ gnomebt_ui_api_name,
+ sources: ui_sources + enum_sources + client_built_sources + ui_built_sources,
+ version: libversion,
+ include_directories: top_inc,
+ dependencies: ui_deps + ui_private_deps,
+ c_args: cflags,
+ link_args: ui_ldflags,
+ link_depends: ui_symbol_map,
+ install: true,
+)
+
+libgnome_bluetooth_ui_dep = declare_dependency(
+ link_with: libgnome_bluetooth_ui,
+ include_directories: lib_inc,
+ dependencies: ui_deps,
+)
+
+pkg.generate(
+ libraries: libgnome_bluetooth_ui,
+ version: gnomebt_version,
+ name: gnomebt_ui_api_name,
+ description: 'Bluetooth libraries for gnome-control-center',
+ filebase: gnomebt_ui_api_name,
+ subdirs: gnomebt_api_name,
+ requires: deps,
+ variables: 'exec_prefix=${prefix}',
+)
+
test_names = [
'test-agent',
'test-class',
@@ -156,11 +198,10 @@ test_names = [
foreach name: test_names
executable(
name,
- [name + '.c'] + built_sources,
+ [name + '.c'] + ui_sources + ui_built_sources + enum_sources + client_built_sources,
include_directories: top_inc,
- dependencies: deps + private_deps,
+ dependencies: ui_deps + ui_private_deps,
c_args: cflags,
- link_with: libgnome_bluetooth,
)
endforeach
diff --git a/lib/test-pin.c b/lib/test-pin.c
index 7403c069..405d1e4f 100644
--- a/lib/test-pin.c
+++ b/lib/test-pin.c
@@ -1,5 +1,5 @@
-#include "pin.c"
#include "bluetooth-enums.h"
+#include "pin.h"
int main (int argc, char **argv)
{
diff --git a/meson.build b/meson.build
index 1b27f533..895c5070 100644
--- a/meson.build
+++ b/meson.build
@@ -12,6 +12,7 @@ gnomebt_major_version = version_array[0].to_int()
gnomebt_api_version = '3.0'
gnomebt_api_name = '@0@-@1@'.format(meson.project_name(), gnomebt_api_version)
+gnomebt_ui_api_name = '@0@-ui-@1@'.format(meson.project_name(), gnomebt_api_version)
gnomebt_gettext_package = gnomebt_api_name
gnomebt_gir_ns = 'GnomeBluetooth'
diff --git a/sendto/meson.build b/sendto/meson.build
index 3e233a03..7694b692 100644
--- a/sendto/meson.build
+++ b/sendto/meson.build
@@ -4,7 +4,7 @@ executable(
name,
'main.c',
include_directories: top_inc,
- dependencies: libgnome_bluetooth_dep,
+ dependencies: [libgnome_bluetooth_dep, gtk_dep],
install: true,
)
diff --git a/tests/meson.build b/tests/meson.build
index 1d1b2e0e..7582027a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -18,7 +18,7 @@ endif
test_bluetooth_device = executable('test-bluetooth-device',
'test-bluetooth-device.c',
include_directories: lib_inc,
- dependencies: deps + private_deps,
+ dependencies: deps,
c_args: cflags,
link_with: libgnome_bluetooth,
)
@@ -30,7 +30,7 @@ test('test-bluetooth-device-test',
test_bluetooth_utils = executable('test-bluetooth-utils',
[ 'test-bluetooth-utils.c', enum_sources ],
include_directories: [ top_inc, lib_inc],
- dependencies: deps + private_deps,
+ dependencies: deps,
c_args: cflags,
link_with: libgnome_bluetooth,
)