[gnome-desktop/ebassi/update-for-gtk4: 16/17] Add libgnome-desktop-ui-4




commit 1c97b6aa08d3fc4b55e88057d955c7443c99246b
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Oct 29 16:18:28 2021 +0100

    Add libgnome-desktop-ui-4
    
    Now that we split the non-GUI bits of libgnome-desktop into their own
    library, we can provide a library for GUI ones.
    
    For the time being, this is all still using GTK 3.

 libgnome-desktop/meson.build   | 84 ++++++++++++++++++++++++++++++++++++++++++
 libgnome-desktop/ui-symbol.map |  6 +++
 2 files changed, 90 insertions(+)
---
diff --git a/libgnome-desktop/meson.build b/libgnome-desktop/meson.build
index ab0819b0..1e652c5a 100644
--- a/libgnome-desktop/meson.build
+++ b/libgnome-desktop/meson.build
@@ -150,6 +150,90 @@ libgnome_desktop_base_dep = declare_dependency(
   ],
 )
 
+### gnome-desktop-ui
+ui_ldflags = []
+ui_symbol_map = '-Wl,--version-script=@0@'.format(meson.current_source_dir() / 'ui-symbol.map')
+if cc.has_link_argument(ui_symbol_map)
+  ui_ldflags += ui_symbol_map
+endif
+
+libgnome_desktop_ui_sources = [
+  'gnome-bg.c',
+  'gnome-bg-slide-show.c',
+  'gnome-bg-crossfade.c',
+  'gnome-rr.c',
+  'gnome-rr-config.c',
+  'gnome-rr-output-info.c',
+]
+
+libgnome_desktop_ui_headers = [
+  'gnome-bg.h',
+  'gnome-bg-crossfade.h',
+  'gnome-bg-slide-show.h',
+  'gnome-rr.h',
+  'gnome-rr-config.h',
+]
+
+install_headers(libgnome_desktop_ui_headers,
+  subdir: 'gnome-desktop-4.0/libgnome-desktop-ui'
+)
+
+ui_deps = [
+  libgnome_desktop_base_dep,
+  gtk3_dep,
+]
+
+libgnome_desktop_ui = library('gnome-desktop-ui-4',
+  sources: [
+    libgnome_desktop_ui_sources,
+    dbus_xrandr_built_sources,
+  ],
+  dependencies: ui_deps,
+  soversion: 0,
+  version: libversion,
+  c_args: libargs,
+  link_args: ui_ldflags,
+  install: true,
+  include_directories: [
+    include_directories('.'),
+    include_directories('..'),
+  ],
+)
+
+libgnome_desktop_ui_gir = gnome.generate_gir(libgnome_desktop_ui,
+  sources: [libgnome_desktop_ui_headers, libgnome_desktop_ui_sources],
+  export_packages: 'gnome-desktop-ui-4',
+  namespace: 'GnomeDesktopUI',
+  nsversion: '4.0',
+  includes: [libgnome_desktop_base_gir[0], 'Gtk-3.0'],
+  extra_args: ['-DGNOME_DESKTOP_USE_UNSTABLE_API', '--quiet', '--warn-all'],
+  identifier_prefix: 'Gnome',
+  symbol_prefix: 'gnome',
+  install: true,
+)
+
+libgnome_desktop_ui_dep = declare_dependency(
+  sources: [
+    libgnome_desktop_ui_gir,
+  ],
+  dependencies: ui_deps,
+  link_with: libgnome_desktop_ui,
+  include_directories: [
+    include_directories('.'),
+    include_directories('..'),
+  ],
+)
+
+pkg.generate(
+  libgnome_desktop_ui,
+  requires: ['gsettings-desktop-schemas'],
+  version: meson.project_version(),
+  name: 'gnome-desktop-ui-4',
+  filebase: 'gnome-desktop-ui-4',
+  description: 'GUI utility library for GNOME desktop components',
+  subdirs: 'gnome-desktop-4.0',
+)
+
 ### Legacy ###
 
 introspection_sources = [
diff --git a/libgnome-desktop/ui-symbol.map b/libgnome-desktop/ui-symbol.map
new file mode 100644
index 00000000..671c1560
--- /dev/null
+++ b/libgnome-desktop/ui-symbol.map
@@ -0,0 +1,6 @@
+{
+global:
+  gnome_*;
+local:
+  *;
+};


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]