summaryrefslogtreecommitdiff
path: root/contrib/session-helper/meson.build
blob: 66e6e5b80b481200226a54db318f786fcf42d156 (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
cargs = ['-DG_LOG_DOMAIN="Cd"']

install_data('org.freedesktop.ColorHelper.xml',
  install_dir : join_paths(datadir, 'dbus-1', 'interfaces')
)

install_headers(
  'cd-session.h',
  subdir : 'colord-1/colord-session',
)

con2 = configuration_data()
con2.set('servicedir', libexecdir)

# replace @servicedir@
if get_option('systemd')
  configure_file(
    input : 'colord-session.service.in',
    output : 'colord-session.service',
    configuration : con2,
    install: true,
    install_dir: systemd.get_pkgconfig_variable('systemduserunitdir'),
  )
endif

# replace @servicedir@
configure_file(
  input : 'org.freedesktop.ColorHelper.service.in',
  output : 'org.freedesktop.ColorHelper.service',
  configuration : con2,
  install: true,
  install_dir: join_paths(datadir, 'dbus-1', 'services') ,
)

executable(
  'colord-session',
  sources : [
    'cd-debug.c',
    'cd-debug.h',
    'cd-main.c',
    'cd-session.h',
    'cd-state.c',
    'cd-state.h',
  ],
  include_directories : [
    colord_incdir,
    lib_incdir,
    root_incdir,
  ],
  dependencies : [
    gio,
    lcms,
    libm,
  ],
  link_with : colord,
  c_args : [
    cargs,
  ],
  install : true,
  install_dir : libexecdir
)

install_data('org.freedesktop.ColorHelper.gschema.xml',
             install_dir : 'share/glib-2.0/schemas')

if get_option('session_example')
  executable(
    'colord-session-example',
    sources : [
      'cd-example.c',
    ],
    include_directories : [
    root_incdir,
      colord_incdir,
      lib_incdir,
      root_incdir,
    ],
    dependencies : [
      gio,
      lcms,
      libm,
      colord_gtk,
      gnome_desktop,
    ],
    link_with : colord,
    c_args : [
      cargs,
    ],
  )
endif