summaryrefslogtreecommitdiff
path: root/src/meson.build
blob: 92e6fff1f3bf9f9ae18779a86efc83c76843a556 (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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
resources = gnome.compile_resources(
  'eom-resources',
  'eom.gresource.xml',
  c_name: '_eom',
  source_dir: '../data',
)

marshal = gnome.genmarshal('eom-marshal', sources: ['eom-marshal.list'], prefix: 'eom_marshal')

inst_headers = files(
  'eom-application.h',
  'eom-application-activatable.h',
  'eom-debug.h',
  'eom-window.h',
  'eom-window-activatable.h',
  'eom-sidebar.h',
  'eom-properties-dialog.h',
  'eom-error-message-area.h',
  'eom-file-chooser.h',
  'eom-statusbar.h',
  'eom-thumb-nav.h',
  'eom-transform.h',
  'eom-image.h',
  'eom-enums.h',
  'eom-image-save-info.h',
  'eom-scroll-view.h',
  'eom-thumb-view.h',
  'eom-list-store.h',
  'eom-thumbnail.h',
  'eom-job-queue.h',
  'eom-clipboard-handler.h',
  'eom-jobs.h',
)

noinst_headers = files(
  'eom-application-internal.h',
  'eom-session.h',
  'eom-util.h',
  'eom-pixbuf-util.h',
  'eom-preferences-dialog.h',
  'eom-config-keys.h',
  'eom-image-jpeg.h',
  'eom-image-private.h',
  'eom-metadata-sidebar.h',
  'eom-uri-converter.h',
  'eom-metadata-reader.h',
  'eom-metadata-reader-jpg.h',
  'eom-metadata-reader-png.h',
  'eom-save-as-dialog-helper.h',
  'eom-print-image-setup.h',
  'eom-print-preview.h',
  'eom-print.h',
  'eom-plugin-engine.h',
  'eom-close-confirmation-dialog.h',
  'zoom.h',
)

enum = gnome.mkenums('eom-enum-types', c_template: 'eom-enum-types.c.template', h_template: 'eom-enum-types.h.template', sources: inst_headers)

enum_headers = files(
  'eom-scroll-view.h',
  'eom-window.h',
)

c_sources = files(
  'eom-application.c',
  'eom-application-activatable.c',
  'eom-session.c',
  'eom-debug.c',
  'eom-util.c',
  'eom-pixbuf-util.c',
  'eom-window.c',
  'eom-window-activatable.c',
  'eom-sidebar.c',
  'eom-preferences-dialog.c',
  'eom-properties-dialog.c',
  'eom-error-message-area.c',
  'eom-file-chooser.c',
  'eom-statusbar.c',
  'eom-thumb-nav.c',
  'eom-transform.c',
  'eom-image.c',
  'eom-image-jpeg.c',
  'eom-image-save-info.c',
  'eom-scroll-view.c',
  'eom-thumb-view.c',
  'eom-list-store.c',
  'eom-metadata-sidebar.c',
  'eom-thumbnail.c',
  'eom-job-queue.c',
  'eom-jobs.c',
  'eom-uri-converter.c',
  'eom-metadata-reader.c',
  'eom-metadata-reader-jpg.c',
  'eom-metadata-reader-png.c',
  'eom-save-as-dialog-helper.c',
  'eom-print-image-setup.c',
  'eom-print-preview.c',
  'eom-print.c',
  'eom-close-confirmation-dialog.c',
  'eom-plugin-engine.c',
  'eom-clipboard-handler.c',
  'zoom.c',
)

libeom_src = [
  c_sources,
  enum,
  resources,
  marshal,
  noinst_headers,
  inst_headers,
]

if exif.found()
  inst_headers += files('eom-exif-util.h')
  noinst_headers += files('eom-metadata-details.h')
  libeom_src += files(
    'eom-metadata-details.c',
    'eom-exif-util.c',
  )
endif

if xmp.found()
  noinst_headers += files('eom-metadata-details.h')
  libeom_src += files('eom-metadata-details.c')
endif

cflags = [
 '-DG_LOG_DOMAIN="EOM"',
 '-DEOM_DATA_DIR="' + pkgdatadir + '"',
 '-DEOM_LOCALE_DIR="' + localedir + '"',
 '-DEOM_PLUGIN_DIR="' + pluginsdir + '"',
 '-DLIBDIR="' + libdir + '"',
]

include_dirs = [top_inc, toolbareditor_inc]

if jpeg.found()
  include_dirs += [jpegutils_inc]
endif

libeom = static_library(
  'eom',
  libeom_src,
  c_args: cflags,
  dependencies: all_deps,
  include_directories: include_dirs,
)

src_inc = include_directories('.')

install_headers(inst_headers, install_dir: join_paths(includedir, 'eom-' + eom_api_version, 'eom'))

eom_links = [libeom, toolbareditor]

if jpeg.found()
  eom_links += [jpegutils]
endif

bin = executable(
  'eom', ['main.c', resources],
  install: true,
  c_args: cflags,
  dependencies: all_deps,
  link_with: eom_links,
  include_directories: include_dirs,
)

if gobject_introspection.found()
  gir = gnome.generate_gir(
    bin,
    includes: ['Gtk-3.0'],
    sources: [inst_headers, c_sources, enum, resources, marshal],
    include_directories: include_dirs,
    install: true,
    namespace: 'Eom',
    nsversion: '1.0',
  )
endif