summaryrefslogtreecommitdiffstats
path: root/plugins/xsettings/meson.build
blob: f91b9637df888a4d131ceee2094034f066ad3340 (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
gsd_xsettings_gtk = files('gsd-xsettings-gtk.c')

fc_monitor = files('fc-monitor.c')

wm_button_layout_translation = files('wm-button-layout-translation.c')

sources = gsd_xsettings_gtk + fc_monitor + wm_button_layout_translation + files(
  'gsd-xsettings-manager.c',
  'xsettings-common.c',
  'xsettings-manager.c',
  'main.c'
)

deps = plugins_deps + [
  gtk_dep,
  x11_dep,
  dependency('fontconfig')
]

cflags += ['-DGTK_MODULES_DIRECTORY="@0@"'.format(join_paths(gsd_pkglibdir, 'gtk-modules'))]

executable(
  'gsd-' + plugin_name,
  sources,
  include_directories: [top_inc, common_inc, data_inc],
  dependencies: deps,
  c_args: cflags,
  install: true,
  install_rpath: gsd_pkglibdir,
  install_dir: gsd_libexecdir
)

programs = [
  ['test-gtk-modules', gsd_xsettings_gtk + ['test-gtk-modules.c'], cflags],
  ['test-fontconfig-monitor', fc_monitor, cflags + ['-DFONTCONFIG_MONITOR_TEST']],
  ['test-wm-button-layout-translations', wm_button_layout_translation + ['test-wm-button-layout-translations.c'], []]
]

foreach program: programs
  executable(
    program[0],
    program[1],
    include_directories: top_inc,
    dependencies: deps,
    c_args: program[2]
  )
endforeach

install_data(
  files('00-xrdb'),
  install_dir: join_paths(gsd_sysconfdir, 'xdg/Xwayland-session.d')
)

test_py = find_program('test.py')

envs = [
  'BUILDDIR=' + meson.current_build_dir(),
  'TOP_BUILDDIR=' + meson.build_root()
]

test(
  'test-xsettings',
  test_py,
  env: envs,
  timeout: 300
)