1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
glib_min_ver = '>=2.44.0'
gio_dep = dependency('gio-2.0', version: glib_min_ver, required: true)
gio_unix_dep = dependency('gio-unix-2.0', version: glib_min_ver, required: true)
glib_dep = dependency('glib-2.0', version: glib_min_ver, required: true)
gtk3_dep = dependency('gtk+-3.0', version: '>=3.22', required: true)
gmodule_dep = dependency('gmodule-2.0', version: glib_min_ver, required: true)
libdeps = []
libdeps += gio_dep
libdeps += gio_unix_dep
libdeps += glib_dep
libdeps += gtk3_dep
libdeps += gmodule_dep
libdeps += dependency('gdk-pixbuf-2.0', version: '>=2.22.0', required: true)
libdeps += dependency('cairo', required: true)
libdeps += dependency('x11', required: true)
favorite_vfs_sources = [
'favorite-vfs-file.c',
'favorite-vfs-file-enumerator.c',
'favorite-vfs-file-monitor.c'
]
xapp_debug = [
'xapp-debug.h',
'xapp-debug.c'
]
xapp_headers = [
'xapp-dark-mode-manager.h',
'xapp-favorites.h',
'xapp-gtk-window.h',
'xapp-gpu-offload-helper.h',
'xapp-icon-chooser-button.h',
'xapp-icon-chooser-dialog.h',
'xapp-monitor-blanker.h',
'xapp-preferences-window.h',
'xapp-stack-sidebar.h',
'xapp-status-icon.h',
'xapp-status-icon-monitor.h',
'xapp-style-manager.h',
'xapp-util.h',
'xapp-visibility-group.h'
]
xapp_sources = [
'xapp-dark-mode-manager.c',
'xapp-favorites.c',
'xapp-glade-catalog.c',
'xapp-gtk-window.c',
'xapp-gpu-offload-helper.c',
'xapp-icon-chooser-button.c',
'xapp-icon-chooser-dialog.c',
'xapp-monitor-blanker.c',
'xapp-preferences-window.c',
'xapp-stack-sidebar.c',
'xapp-status-icon.c',
'xapp-status-icon-monitor.c',
'xapp-style-manager.c',
'xapp-util.c',
'xapp-visibility-group.c'
]
switcheroo_sources = gnome.gdbus_codegen(
'xapp-switcheroo-interface',
sources: 'net.hadess.SwitcherooControl.xml',
interface_prefix: 'net.hadess',
namespace: 'XApp'
)
xapp_sources += switcheroo_sources
if not app_lib_only
libdeps += dependency('libgnomekbdui', required: true)
xapp_headers += 'xapp-kbd-layout-controller.h'
xapp_sources += 'xapp-kbd-layout-controller.c'
endif
xapp_statusicon_interface_sources = gnome.gdbus_codegen(
'xapp-statusicon-interface',
sources: 'org.x.StatusIcon.xml',
interface_prefix: 'org.x.StatusIcon',
namespace: 'XApp',
annotations: [[ 'org.x.StatusIcon', 'org.gtk.GDBus.C.Name', 'StatusIconInterface' ]],
object_manager: true,
install_header: true,
install_dir: join_paths(get_option('prefix'), get_option('includedir'), 'xapp/libxapp')
)
dbus_headers = [ xapp_statusicon_interface_sources[1] ]
xapp_sources += xapp_statusicon_interface_sources[0]
xapp_enums = gnome.mkenums_simple('xapp-enums',
sources : xapp_headers,
identifier_prefix : 'XApp',
symbol_prefix : 'xapp'
)
libxapp = library('xapp',
sources : xapp_headers + xapp_sources + xapp_enums + dbus_headers + favorite_vfs_sources + xapp_debug,
include_directories: [top_inc],
version: meson.project_version(),
soversion: '1',
dependencies: libdeps,
c_args: ['-Wno-declaration-after-statement', '-DG_LOG_DOMAIN="XApp"'],
link_args: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', '-lm'],
install: true
)
install_headers(xapp_headers,
subdir: 'xapp/libxapp'
)
libxapp_dep = declare_dependency(
link_with: libxapp,
include_directories: top_inc,
dependencies: libdeps,
sources: [ xapp_headers, dbus_headers ]
)
if get_option('introspection')
gir = gnome.generate_gir(libxapp,
namespace: 'XApp',
nsversion: '1.0',
sources: xapp_headers + xapp_sources + dbus_headers + xapp_enums,
identifier_prefix: 'XApp',
symbol_prefix: 'xapp_',
export_packages: 'xapp',
includes: ['GObject-2.0', 'Gtk-3.0'],
install: true
)
endif
pkg.generate(
libraries: libxapp,
name: 'xapp',
subdirs: 'xapp',
description: 'Utility library',
version: meson.project_version(),
requires: ['gtk+-3.0', 'gobject-2.0', 'cairo'],
requires_private: 'xkbfile',
)
install_data(['xapp-glade-catalog.xml'],
install_dir : join_paths(get_option('datadir'), 'glade/catalogs')
)
if get_option('vapi')
assert(is_variable('gir'), 'vapi requires introspection to be enabled')
gnome.generate_vapi('xapp',
packages: ['glib-2.0', 'gio-unix-2.0', 'gtk+-3.0'],
sources: gir[0],
metadata_dirs: meson.current_source_dir(),
install: true
)
endif
if not app_lib_only
gtk3_module = shared_module(
'xapp-gtk3-module', ['xapp-gtk3-module.c'],
include_directories: [top_inc],
dependencies: [gtk3_dep, libxapp_dep],
install: true,
install_dir: join_paths(gtk3_dep.get_variable(pkgconfig: 'libdir'),'gtk-3.0','modules')
)
endif
|