Debian Codegraph @

lib/colorhug/meson.build

raw
1 cargs = [
2 '-DG_LOG_DOMAIN="libcolorhug"',
3 ]
4
5 ch_version_h_conf = configuration_data()
6 ch_version_h_conf.set('CD_MAJOR_VERSION', colord_major_version)
7 ch_version_h_conf.set('CD_MINOR_VERSION', colord_minor_version)
8 ch_version_h_conf.set('CD_MICRO_VERSION', colord_micro_version)
9
10 colorhug_version_h = configure_file(
11 input : 'ch-version.h.in',
12 output : 'ch-version.h',
13 configuration : ch_version_h_conf,
14 install : true,
15 install_dir: join_paths(includedir, 'colord-1', 'colorhug'),
16 )
17
18 install_headers(
19 'ch-common.h',
20 'ch-device.h',
21 'ch-device-queue.h',
22 'ch-hash.h',
23 'ch-inhx32.h',
24 'ch-math.h',
25 'colorhug.h',
26 subdir : 'colord-1/colorhug',
27 )
28
29 mapfile = 'colorhug.map'
30 vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
31 colorhug = shared_library(
32 'colorhug',
33 sources : [
34 'ch-common.c',
35 'ch-device.c',
36 'ch-device-queue.c',
37 'ch-hash.c',
38 'ch-inhx32.c',
39 'ch-math.c',
40 ],
41 soversion : lt_current,
42 version : lt_version,
43 dependencies : [
44 giounix,
45 gusb,
46 lcms,
47 libm,
48 libudev,
49 ],
50 c_args : [
51 cargs,
52 '-DLOCALSTATEDIR="' + localstatedir + '"',
53 ],
54 link_with : colordprivate,
55 include_directories : [
56 colord_incdir,
57 lib_incdir,
58 root_incdir,
59 ],
60 link_args : vflag,
61 link_depends : mapfile,
62 install : true
63 )
64
65 pkgg = import('pkgconfig')
66 pkgg.generate(
67 libraries : colorhug,
68 requires : [ 'gio-2.0', 'gobject-2.0', 'gusb', 'colord' ],
69 subdirs : 'colord-1/colorhug',
70 version : meson.project_version(),
71 name : 'colorhug',
72 filebase : 'colorhug',
73 description : 'ColorHug is a simple display hardware colorimeter',
74 )
75
76 if get_option('introspection')
77 libcolorhug_gir = gnome.generate_gir(colorhug,
78 sources : [
79 'ch-common.c',
80 'ch-common.h',
81 'ch-device.c',
82 'ch-device.h',
83 'ch-device-queue.c',
84 'ch-device-queue.h',
85 'ch-hash.c',
86 'ch-hash.h',
87 ],
88 nsversion : '1.0',
89 namespace : 'Colorhug',
90 symbol_prefix : 'ch',
91 identifier_prefix : 'Ch',
92 export_packages : 'colorhug',
93 link_with : colorhug,
94 dependencies : [
95 gio,
96 glib,
97 lcms,
98 ],
99 includes : [
100 'Gio-2.0',
101 'GObject-2.0',
102 'GUsb-1.0',
103 libcolord_gir,
104 ],
105 extra_args : [
106 '--c-include=colorhug.h',
107 '-DCD_COMPILATION',
108 ],
109 install : true
110 )
111 endif
112
113 if get_option('tests')
114 e = executable(
115 'ch-self-test',
116 sources : [
117 'ch-self-test.c',
118 ],
119 include_directories : [
120 colord_incdir,
121 lib_incdir,
122 root_incdir,
123 ],
124 dependencies : [
125 gio,
126 gusb,
127 lcms,
128 ],
129 link_with : [
130 colordprivate,
131 colorhug,
132 ],
133 )
134 test('colorhug-self-test', e)
135 endif