grim/guifications2

bb8a7baad156
Disable deprecations via cflag instead of inline macros
###############################################################################
# Project Info
###############################################################################
project('guifications', 'c',
license : 'GPL-2.0-or-later',
version : '2.17.0-dev',
meson_version : '>=0.52.0',
default_options : ['c_std=c99'])
parts = meson.project_version().split('-')
if parts.length() > 1
extra = parts[1]
else
extra = ''
endif
parts = parts[0].split('.')
version_conf = configuration_data()
version_conf.set('GUIFICATIONS_MAJOR_VERSION', parts[0])
version_conf.set('GUIFICATIONS_MINOR_VERSION', parts[1])
version_conf.set('GUIFICATIONS_MICRO_VERSION', parts[2])
version_conf.set('GUIFICATIONS_EXTRA_VERSION', extra)
version_conf.set('VERSION', meson.project_version())
###############################################################################
# Dependencies
###############################################################################
GLIB = dependency('glib-2.0', version : '>=2.14.0')
GTK2 = dependency('gtk+-2.0', version : '>=2.14.0')
CAIRO = dependency('cairo')
FREETYPE2 = dependency('freetype2')
PANGOFT2 = dependency('pangoft2', version : '>=1.1.0')
PURPLE = dependency('purple')
PIDGIN = dependency('pidgin')
###############################################################################
# NLS
###############################################################################
GETTEXT_PACKAGE = 'guifications'
LOCALE_DIR = get_option('prefix') / get_option('localedir')
if target_machine.system() != 'windows'
add_project_arguments('-DLOCALEDIR="@0@"'.format(LOCALE_DIR), language : 'c')
endif
add_project_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE),
language : 'c')
if get_option('nls')
i18n = import('i18n')
endif
###############################################################################
# Build Info
###############################################################################
compiler = meson.get_compiler('c')
if target_machine.system() != 'windows'
add_project_arguments(
'-DDATADIR="@0@"'.format(get_option('prefix') / get_option('datadir')),
'-DPREFIX="@0@"'.format(get_option('prefix')),
language : 'c'
)
endif
add_project_arguments(
'-DGF_WEBSITE="https://keep.imfreedom.org/grim/guifications2"',
'-DGF_VERSION="@0@"'.format(meson.project_version()),
'-DGLIB_DISABLE_DEPRECATION_WARNINGS',
language : 'c'
)
if compiler.has_argument('-Wformat')
add_project_arguments('-Wformat', language : 'c')
if compiler.has_multi_arguments(['-Wformat', '-Werror=format-security'])
add_project_arguments('-Werror=format-security', language : 'c')
endif
endif
toplevel_inc = include_directories('.')
###############################################################################
# Subdirectories
###############################################################################
subdir('packaging')
subdir('pixmaps')
subdir('po')
subdir('src')
subdir('themes')
###############################################################################
# Install stuff
###############################################################################
install_data('ChangeLog', 'INSTALL', 'README',
install_dir : get_option('datadir') / 'doc' / 'guifications2')