summaryrefslogtreecommitdiffstats
path: root/src/meson.build
blob: 6b537363836af544cd4ed287cf650539d89dd595 (plain)
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
subdir('legacy')

system_monitor_sources = [
  'application.cpp',
  'argv.cpp',
  'cgroups.cpp',
  'disks.cpp',
  'gsm_gksu.cpp',
  'gsm_gnomesu.cpp',
  'gsm_pkexec.cpp',
  'interface.cpp',
  'load-graph.cpp',
  'lsof.cpp',
  'main.cpp',
  'setaffinity.cpp',
  'memmaps.cpp',
  'openfiles.cpp',
  'prefsdialog.cpp',
  'prettytable.cpp',
  'procactions.cpp',
  'procdialogs.cpp',
  'procproperties.cpp',
  'proctable.cpp',
  'selinux.cpp',
  'smooth_refresh.cpp',
  'systemd.cpp',
  'util.cpp',
]

system_monitor_headers = [
  'prettytable.h',
  'procdialogs.h',
  'cgroups.h',
  'application.h',
  'smooth_refresh.h',
  'gsm_gnomesu.h',
  'openfiles.h',
  'procproperties.h',
  'lsof.h',
  'proctable.h',
  'settings-keys.h',
  'setaffinity.h',
  'memmaps.h',
  'procactions.h',
  'systemd.h',
  'argv.h',
  'prefsdialog.h',
  'selinux.h',
  'util.h',
  'gsm_gksu.h',
  'interface.h',
  'load-graph.h',
  'disks.h',
  'gsm_pkexec.h',
  'defaulttable.h',
  'legacy/treeview.h',
  'legacy/e_date.h',
  'legacy/gsm_color_button.h',
]

gsm_resource_dir = join_paths(get_option('datadir'), meson.project_name())
gsm_resource = gnome.compile_resources(
  'gsm',
  'gsm.gresource.xml',
  gresource_bundle: true,
  source_dir: meson.source_root(),
  install: true,
  install_dir: gsm_resource_dir,
)

gsm_schemas = configure_file(
  input : 'org.gnome.gnome-system-monitor.gschema.xml.in',
  output: 'org.gnome.gnome-system-monitor.gschema.xml',
  configuration: dataconf,
  install: true,
  install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas'),
)

gsm_gsettings = gnome.mkenums('org.gnome.gnome-system-monitor.enums.xml',
  sources: system_monitor_headers,
  comments: '<!-- @comment@ -->',
  fhead:    '<schemalist>',
  vhead:    '  <@type@ id=\'org.gnome.gnome-system-monitor.@EnumName@\'>',
  vprod:    '    <value nick=\'@valuenick@\' value=\'@valuenum@\'/>',
  vtail:    '  </@type@>',
  ftail:    '</schemalist>',
  install_header: true,
  install_dir: join_paths(get_option('datadir'), 'glib-2.0', 'schemas'),
)


executable(meson.project_name(),
  system_monitor_sources,
  include_directories: rootInclude,
  dependencies: [
    gmodule,
    gtkmm,
    atkmm,
    libgtop,
    libhandy,
    libsystemd,
    libwnck,
  ],
  link_with: libgsm_legacy,
  cpp_args: [
    '-DGSM_RESOURCE_FILE="@0@"'.format(join_paths(
      get_option('prefix'), gsm_resource_dir, 'gsm.gresource')),
  ],
  install: true,
)