summaryrefslogtreecommitdiff
path: root/src/meson.build
blob: 0e4679aa4b0a9735e64ed69ca14291316144ea51 (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
sources = files(
  'glade-http.c',
  'glade-intro.c',
  'glade-preferences.c',
  'glade-registration.c',
  'glade-settings.c',
  'glade-window.c',
  'main.c',
)

resource_data = files(
  'glade.glade',
  'glade-preferences.glade',
  'glade-registration.css',
  'glade-registration.glade',
  'glade-window.css',
)

resource = 'glade-resources'

sources += gnome.compile_resources(
  resource,
  resource + '.gresource.xml',
  c_name: '_glade',
  dependencies: resource_data,
  export: true,
)

deps = [
  gmodule_export_dep,
  libgladeui_dep,
]

ldflags = []
if glade_system == 'windows'
  rc = configure_file(
    input: 'glade.rc.in',
    output: '@BASELINE@',
    configuration: rc_conf,
  )

  sources += windows.compile_resources(rc)

  test_ldflags = ['-export-dynamic']
  if not glade_unstable
    test_ldflags += ['-mwindows']
  endif
  ldflags += cc.get_supported_link_arguments(test_ldflags)
endif

executable(
  'glade',
  sources,
  include_directories: top_inc,
  dependencies: deps,
  c_args: '-DGLADE_GNOMEHELPDIR="@0@"'.format(glade_prefix / glade_datadir / 'help'),
  link_args: ldflags,
  install: true,
)