traversity/traversity

remove the lib prefix from places it didn't make sense
default tip
15 months ago, Gary Kramlich
4e78a8475ee4
remove the lib prefix from places it didn't make sense

Testing Done:
compiled

Reviewed at https://reviews.imfreedom.org/r/2314/
project('traversity', 'C',
license : 'LGPL-2.0-or-later',
version : '0.0.1',
meson_version : '>=0.63.0',
default_options : ['c_std=c17', 'warning_level=2'])
###############################################################################
# Version Stuff
###############################################################################
traversity_soversion = 0
parts = meson.project_version().split('-')
if parts.length() > 1
traversity_extra_version = parts[1]
else
traversity_extra_version = ''
endif
parts = parts[0].split('.')
traversity_major_version = parts[0]
traversity_minor_version = parts[1]
traversity_micro_version = parts[2]
LIBTRAVERSITY_VERSION = '@0@.@1@.@2@'.format(traversity_soversion,
traversity_minor_version,
traversity_micro_version)
conf = configuration_data()
conf.set_quoted('PACKAGE', meson.project_name())
conf.set_quoted('PACKAGE_NAME', meson.project_name())
conf.set_quoted('VERSION', meson.project_version())
conf.set_quoted('DISPLAY_VERSION', meson.project_version())
version_conf = configuration_data()
version_conf.set('TRAVERSITY_MAJOR_VERSION', traversity_major_version)
version_conf.set('TRAVERSITY_MINOR_VERSION', traversity_minor_version)
version_conf.set('TRAVERSITY_MICRO_VERSION', traversity_micro_version)
version_conf.set('TRAVERSITY_EXTRA_VERSION', traversity_extra_version)
version_conf.set('TRAVERSITY_VERSION', meson.project_version())
version_conf.set('TRAVERSITY_API_VERSION', traversity_soversion)
###############################################################################
# Gettext
###############################################################################
GETTEXT_PACKAGE = meson.project_name()
find_program('gettext')
find_program('xgettext')
###############################################################################
# Module imports
###############################################################################
gnome = import('gnome')
pkgconfig = import('pkgconfig')
###############################################################################
# Basic Variables
###############################################################################
toplevel_inc = include_directories('.')
###############################################################################
# Main Dependencies
###############################################################################
GLIB = dependency('glib-2.0', version : '>=2.70.0')
add_project_arguments(
'-D_GNU_SOURCE',
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_70',
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_70',
'-DHAVE_CONFIG_H=1',
language : 'c',
)
GOBJECT = dependency('gobject-2.0', version : '>=2.70.0')
TEMPLATE_GLIB = dependency('template-glib-1.0', version : '>=3.30.0')
###############################################################################
# compile features
###############################################################################
cc = meson.get_compiler('c')
conf.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
conf.set('HAVE_INET_NTOP', cc.has_function('inet_ntop'))
add_project_arguments([
'-DVERSION="@0@"'.format(meson.project_version()),
'-DDISPLAY_VERSION="@0@"'.format(meson.project_version()),
f'-DGETTEXT_PACKAGE="@GETTEXT_PACKAGE@"'],
language : 'c')
###############################################################################
# Documentation
###############################################################################
if get_option('doc') and not get_option('introspection')
error('Documentation requires GObject Introspection.')
endif
gidocgen_dep = dependency(
'gi-docgen', version: '>= 2021.1',
fallback: ['gi-docgen', 'dummy_dep'],
required: get_option('doc')
)
gidocgen = find_program('gi-docgen', required : get_option('doc'))
docs_dir = get_option('prefix') / get_option('datadir') / 'doc'
###############################################################################
# Subdirectories
###############################################################################
subdir('po')
subdir('traversity')
subdir('traversity-test')
# Output our configuration file.
configure_file(output : 'config.h', configuration : conf)