summaryrefslogtreecommitdiff
path: root/shell/meson.build
blob: 241b140cae3e1c3a54cea33117cbc34aa5485ed5 (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
subdir('appdata')
subdir('completions')

service_conf = configuration_data()
service_conf.set('bindir', control_center_bindir)

service = 'org.gnome.ControlCenter.service'

configure_file(
  input: service + '.in',
  output: service,
  install: true,
  install_dir: join_paths(control_center_datadir, 'dbus-1', 'services'),
  configuration: service_conf
)

desktop = 'gnome-control-center.desktop'

desktop_in = configure_file(
  input: desktop + '.in.in',
  output: desktop + '.in',
  configuration: desktop_conf
)

i18n.merge_file(
  desktop,
  type: 'desktop',
  input: desktop_in,
  output: desktop,
  po_dir: po_dir,
  install: true,
  install_dir: control_center_desktopdir
)

cflags = ['-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)]

libshell = static_library(
  'shell',
  sources: 'cc-shell-model.c',
  include_directories: [top_inc, common_inc],
  dependencies: common_deps,
  c_args: cflags
)

sources = files(
  'cc-application.c',
  'cc-log.c',
  'cc-object-storage.c',
  'cc-panel-loader.c',
  'cc-panel.c',
  'cc-shell-category-view.c',
  'cc-shell-item-view.c',
  'cc-shell.c',
  'main.c'
)

resource_data = files(
  'help-overlay.ui',
  'panel-list.ui',
  'window.ui'
)

sources += gnome.compile_resources(
  'resources',
  meson.project_name() + '.gresource.xml',
  dependencies: resource_data,
  export: true
)

sources += files(
  'cc-panel-list.c',
  'cc-window.c'
)

shell_deps = common_deps + [
  libdevice_dep,
  liblanguage_dep,
  libwidgets_dep,
  x11_dep
]

if enable_cheese
  shell_deps += cheese_deps
endif

if host_is_linux_not_s390
  shell_deps += wacom_deps
endif

# Debug
debug_conf = configuration_data()
debug_conf.set('BUGREPORT_URL', 'http://bugzilla.gnome.org/enter_bug.cgi?product=' + meson.project_name())
debug_conf.set10('ENABLE_TRACING', enable_tracing)

sources += configure_file(
  input: 'cc-debug.h.in',
  output: 'cc-debug.h',
  configuration: debug_conf
)

executable(
  meson.project_name(),
  sources,
  include_directories: top_inc,
  dependencies: shell_deps,
  c_args: cflags,
  link_with: panels_libs + [libshell],
  install: true
)

# Because it is confusing and somewhat problematic to directly add and compile
# cc-panel-loader.o by another directory (i.e. the shell search provider), we
# have to create a library and link it there, just like libshell.la.
libpanel_loader = static_library(
  'panel_loader',
  sources: 'cc-panel-loader.c',
  include_directories: top_inc,
  dependencies: common_deps,
  c_args: cflags + ['-DCC_PANEL_LOADER_NO_GTYPES']
)

# libshell_test
sources = files(
  'cc-panel.c',
  'cc-shell.c',
  'cc-log.c',
  'cc-object-storage.c',
)
libtestshell = static_library(
  'testshell',
  sources,
  include_directories: top_inc,
  dependencies: common_deps + [ libwidgets_dep ],
  c_args: cflags,
  link_with: panels_libs
)
libtestshell_dep = declare_dependency(
  include_directories: top_inc,
  link_with: libtestshell
)
libtestshell_deps = common_deps + [ libwidgets_dep, libtestshell_dep ]


install_data ('org.gnome.ControlCenter.gschema.xml',
              install_dir: control_center_schemadir)