summaryrefslogtreecommitdiff
path: root/src/meson.build
blob: 0c72490add848a100ae4308f2035a0acd671d842 (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
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
# configuration
conf_data = configuration_data()
conf_data.set('version', meson.project_version())
conf_data.set('sysconfdir', sysconfdir_path)
conf_data.set('datadir', datadir_path)
conf_data.set('bindir', bindir_path)
conf_data.set('sbindir', sbindir_path)
conf_data.set('localedir', localedir_path)
conf_data.set('iconsdir', iconsdir_path)
conf_data.set('gettext_package', meson.project_name())
conf_data.set('WITH_KEYRING', get_option('keyring').enabled())

configure_file(input: 'config.h.in', output: 'config.h', configuration: conf_data)

gpm_marshal = gnome.genmarshal('gpm-marshal', sources: 'gpm-marshal.list', prefix: 'gpm_marshal')

dbus_binding_powermanager = custom_target('org.mate.PowerManager.h',
  input: 'org.mate.PowerManager.xml',
  output: 'org.mate.PowerManager.h',
  command: [dbus_binding_tool, '--prefix=gpm_manager', '--mode=glib-server', '--output=@OUTPUT@', '@INPUT@']
)

dbus_binding_backlight = custom_target('org.mate.PowerManager.Backlight.h',
  input: 'org.mate.PowerManager.Backlight.xml',
  output: 'org.mate.PowerManager.Backlight.h',
  command: [dbus_binding_tool, '--prefix=gpm_backlight', '--mode=glib-server', '--output=@OUTPUT@', '@INPUT@']
)

dbus_binding_kbdbacklight = custom_target('org.mate.PowerManager.KbdBacklight.h',
  input: 'org.mate.PowerManager.KbdBacklight.xml',
  output: 'org.mate.PowerManager.KbdBacklight.h',
  command: [dbus_binding_tool, '--prefix=gpm_kbd_backlight', '--mode=glib-server', '--output=@OUTPUT@', '@INPUT@']
)

statics_resources = gnome.compile_resources(
  'mate-power-statistics-resources',
  '../data/org.mate.power-manager.statistics.gresource.xml',
  c_name: 'statistics',
  source_dir: '../data'
)

preferences_resources = gnome.compile_resources(
  'mate-power-preferences-resources',
  '../data/org.mate.power-manager.preferences.gresource.xml',
  c_name: 'preferences',
  source_dir: '../data'
)

power_manager_resources = gnome.compile_resources(
  'mate-power-manager-resources',
  '../data/org.mate.power-manager.manager.gresource.xml',
  c_name: 'preferences',
  source_dir: '../data'
)

src_libgpmshared_a = [
  gpm_marshal,
  dbus_binding_powermanager,
  dbus_binding_backlight,
  dbus_binding_kbdbacklight,
  'egg-color.c',
  'egg-color.h',
  'egg-precision.h',
  'egg-precision.c',
  'egg-array-float.c',
  'egg-array-float.h',
  'egg-idletime.h',
  'egg-idletime.c',
  'egg-discrete.h',
  'egg-discrete.c',
  'egg-console-kit.h',
  'egg-console-kit.c',
  'gpm-common.h',
  'gpm-common.c',
  'gpm-brightness.h',
  'gpm-brightness.c',
  'gpm-upower.c',
  'gpm-upower.h',
]

mpm_static_lib = static_library('libgpmshared', src_libgpmshared_a, dependencies: dependencies)

executable('mate-power-backlight-helper', 'gpm-backlight-helper.c', dependencies: dependencies, link_with: [mpm_static_lib])

executable(
  'mate-power-statistics',
  [
    'gpm-statistics.c',
    'gpm-point-obj.c',
    'gpm-point-obj.h',
    'gpm-graph-widget.h',
    'gpm-graph-widget.c'
  ],
  dependencies: dependencies,
  link_with: [mpm_static_lib]
)

executable(
  'mate-power-preferences',
  [
    preferences_resources,
    'gpm-prefs.c',
    'gpm-prefs-core.h',
    'gpm-prefs-core.c'
  ],
  dependencies: dependencies,
  link_with: [mpm_static_lib]
)

executable(
  'mate-power-manager',
  [
    power_manager_resources,
    'gpm-dpms.h',
    'gpm-dpms.c',
	  'gpm-phone.h',
	  'gpm-phone.c',
	  'gpm-backlight.h',
	  'gpm-backlight.c',
	  'gpm-idle.h',
	  'gpm-idle.c',
	  'gpm-load.h',
	  'gpm-load.c',
	  'gpm-control.h',
	  'gpm-control.c',
	  'gpm-button.h',
	  'gpm-button.c',
	  'gpm-kbd-backlight.h',
	  'gpm-kbd-backlight.c',
	  'gpm-main.c',
	  'gpm-manager.h',
	  'gpm-manager.c',
	  'gpm-tray-icon.h',
	  'gpm-tray-icon.c',
	  'gpm-screensaver.h',
	  'gpm-screensaver.c',
	  'gpm-session.h',
	  'gpm-session.c',
	  'gpm-networkmanager.h',
	  'gpm-networkmanager.c',
	  'gpm-icon-names.h',
	  'gsd-media-keys-window.h',
	  'gsd-media-keys-window.c',
	  'msd-osd-window.h',
	  'msd-osd-window.c',
	  'gpm-engine.h',
	  'gpm-engine.c',
  ],
  dependencies: dependencies,
  link_with: [mpm_static_lib],
  install : true)