meson.build

changeset 42678
0b9b81b6ff18
parent 42671
68cc8544b438
child 42814
59e6529a1e78
equal deleted inserted replaced
42677:66b49e545c53 42678:0b9b81b6ff18
3 # The version number is: 3 # The version number is:
4 # <major>.<minor>.<micro><extra> 4 # <major>.<minor>.<micro><extra>
5 # 5 #
6 # micro += 1 6 # micro += 1
7 # 7 #
8 # If any functions have been added to libpurple, Pidgin, or Finch: 8 # If any functions have been added to libpurple or Pidgin:
9 # micro = 0 9 # micro = 0
10 # minor += 1 10 # minor += 1
11 # 11 #
12 # If backwards compatibility has been broken in libpurple, Pidgin, or Finch: 12 # If backwards compatibility has been broken in libpurple or Pidgin:
13 # micro = 0 13 # micro = 0
14 # minor = 0 14 # minor = 0
15 # major += 1 15 # major += 1
16 # purple_soversion += 1 16 # purple_soversion += 1
17 # 17 #
122 122
123 conf.set('PURPLE_LIBDIR', 123 conf.set('PURPLE_LIBDIR',
124 f'wpurple_lib_dir("purple-@purple_major_version@")') 124 f'wpurple_lib_dir("purple-@purple_major_version@")')
125 conf.set('PIDGIN_LIBDIR', 125 conf.set('PIDGIN_LIBDIR',
126 f'wpurple_lib_dir("pidgin-@purple_major_version@")') 126 f'wpurple_lib_dir("pidgin-@purple_major_version@")')
127 conf.set('FINCH_LIBDIR',
128 f'wpurple_lib_dir("finch-@purple_major_version@")')
129 127
130 conf.set('PURPLE_DATADIR', 'wpurple_data_dir()') 128 conf.set('PURPLE_DATADIR', 'wpurple_data_dir()')
131 conf.set('PURPLE_SYSCONFDIR', 'wpurple_sysconf_dir()') 129 conf.set('PURPLE_SYSCONFDIR', 'wpurple_sysconf_dir()')
132 conf.set('PURPLE_LOCALEDIR', 'wpurple_locale_dir()') 130 conf.set('PURPLE_LOCALEDIR', 'wpurple_locale_dir()')
133 else 131 else
139 common_libdir = get_option('prefix') / get_option('libdir') 137 common_libdir = get_option('prefix') / get_option('libdir')
140 conf.set_quoted('PURPLE_LIBDIR', 138 conf.set_quoted('PURPLE_LIBDIR',
141 common_libdir / f'purple-@purple_major_version@') 139 common_libdir / f'purple-@purple_major_version@')
142 conf.set_quoted('PIDGIN_LIBDIR', 140 conf.set_quoted('PIDGIN_LIBDIR',
143 common_libdir / f'pidgin-@purple_major_version@') 141 common_libdir / f'pidgin-@purple_major_version@')
144 conf.set_quoted('FINCH_LIBDIR',
145 common_libdir / f'finch-@purple_major_version@')
146 endif 142 endif
147 143
148 abslibdir = get_option('prefix') / get_option('libdir') 144 abslibdir = get_option('prefix') / get_option('libdir')
149 PURPLE_PLUGINDIR = abslibdir / f'purple-@purple_major_version@' 145 PURPLE_PLUGINDIR = abslibdir / f'purple-@purple_major_version@'
150 conf.set_quoted('PURPLE_PLUGINDIR', PURPLE_PLUGINDIR) 146 conf.set_quoted('PURPLE_PLUGINDIR', PURPLE_PLUGINDIR)
151 PIDGIN_PLUGINDIR = abslibdir / f'pidgin-@purple_major_version@' 147 PIDGIN_PLUGINDIR = abslibdir / f'pidgin-@purple_major_version@'
152 conf.set_quoted('PIDGIN_PLUGINDIR', PIDGIN_PLUGINDIR) 148 conf.set_quoted('PIDGIN_PLUGINDIR', PIDGIN_PLUGINDIR)
153 FINCH_PLUGINDIR = abslibdir / f'finch-@purple_major_version@'
154 conf.set_quoted('FINCH_PLUGINDIR', FINCH_PLUGINDIR)
155 149
156 # Windows and Haiku do not use libm for the math functions, they are part 150 # Windows and Haiku do not use libm for the math functions, they are part
157 # of the C library 151 # of the C library
158 math = compiler.find_library('m', required: false) 152 math = compiler.find_library('m', required: false)
159 153
201 libadwaita = dependency('libadwaita-1', version : '>= 1.2') 195 libadwaita = dependency('libadwaita-1', version : '>= 1.2')
202 endif # GTK 196 endif # GTK
203 197
204 ENABLE_GTK = get_option('gtkui') 198 ENABLE_GTK = get_option('gtkui')
205 199
206
207 #######################################################################
208 # Check if we should compile with X support
209 #######################################################################
210 if IS_WIN32
211 x11 = disabler()
212 else
213 x11 = dependency('x11', required : get_option('x'))
214 endif
215 conf.set('HAVE_X11', x11.found())
216 200
217 ####################################################################### 201 #######################################################################
218 # Check for LibXML2 (required) 202 # Check for LibXML2 (required)
219 ####################################################################### 203 #######################################################################
220 libxml = dependency('libxml-2.0', version : '>= 2.6.0') 204 libxml = dependency('libxml-2.0', version : '>= 2.6.0')
288 DYNAMIC_XMPP = DYNAMIC_PRPLS.contains('xmpp') 272 DYNAMIC_XMPP = DYNAMIC_PRPLS.contains('xmpp')
289 273
290 add_project_arguments( 274 add_project_arguments(
291 '-DPURPLE_DISABLE_DEPRECATED', 275 '-DPURPLE_DISABLE_DEPRECATED',
292 '-DPIDGIN_DISABLE_DEPRECATED', 276 '-DPIDGIN_DISABLE_DEPRECATED',
293 '-DFINCH_DISABLE_DEPRECATED',
294 '-DGNT_DISABLE_DEPRECATED', 277 '-DGNT_DISABLE_DEPRECATED',
295 language : 'c') 278 language : 'c')
296 if get_option('buildtype') != 'plain' and compiler.get_id() == 'gcc' 279 if get_option('buildtype') != 'plain' and compiler.get_id() == 'gcc'
297 # We enable -Wall later. 280 # We enable -Wall later.
298 # If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags. 281 # If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
432 # make sure we found our license checker script 415 # make sure we found our license checker script
433 check_license_header = find_program('./scripts/check_license_header.py', required : true) 416 check_license_header = find_program('./scripts/check_license_header.py', required : true)
434 417
435 subdir('libpurple') 418 subdir('libpurple')
436 subdir('purple-history') 419 subdir('purple-history')
437 subdir('finch')
438 subdir('pidgin') 420 subdir('pidgin')
439 subdir('protocols') 421 subdir('protocols')
440 subdir('doc') 422 subdir('doc')
441 subdir('po') 423 subdir('po')
442 424
464 446
465 # TODO: Remove `.found()` once https://github.com/mesonbuild/meson/pull/10949 447 # TODO: Remove `.found()` once https://github.com/mesonbuild/meson/pull/10949
466 # is merged and in a release that we require. 448 # is merged and in a release that we require.
467 summary({ 449 summary({
468 'GTK': get_option('gtkui'), 450 'GTK': get_option('gtkui'),
469 'console': enable_consoleui,
470 'X11 support': x11.found(),
471 }, section: 'User Interfaces', bool_yn: true) 451 }, section: 'User Interfaces', bool_yn: true)
472 452
473 summary({ 453 summary({
474 'Dynamic protocols': DYNAMIC_PRPLS, 454 'Dynamic protocols': DYNAMIC_PRPLS,
475 }, section: 'Protocol Support', bool_yn: true, list_sep: ', ') 455 }, section: 'Protocol Support', bool_yn: true, list_sep: ', ')

mercurial