2019-02-26 18:43:56 +01:00
|
|
|
libmalcontent_api_version = '0'
|
|
|
|
libmalcontent_api_name = 'malcontent-' + libmalcontent_api_version
|
|
|
|
libmalcontent_sources = [
|
|
|
|
'app-filter.c',
|
2020-04-27 13:10:58 +02:00
|
|
|
'init.c',
|
2019-04-24 13:44:50 +02:00
|
|
|
'manager.c',
|
2019-12-06 17:41:08 +01:00
|
|
|
'session-limits.c',
|
2019-02-26 18:43:56 +01:00
|
|
|
]
|
|
|
|
libmalcontent_headers = [
|
|
|
|
'app-filter.h',
|
2019-04-25 17:56:02 +02:00
|
|
|
'malcontent.h',
|
2019-04-24 13:44:50 +02:00
|
|
|
'manager.h',
|
2019-12-06 17:41:08 +01:00
|
|
|
'session-limits.h',
|
2019-04-24 13:44:50 +02:00
|
|
|
]
|
|
|
|
libmalcontent_private_headers = [
|
|
|
|
'app-filter-private.h',
|
2020-04-27 13:10:58 +02:00
|
|
|
'gconstructor.h',
|
2019-12-06 17:41:08 +01:00
|
|
|
'session-limits-private.h',
|
2019-02-26 18:43:56 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
libmalcontent_public_deps = [
|
|
|
|
dependency('gio-2.0', version: '>= 2.44'),
|
|
|
|
dependency('glib-2.0', version: '>= 2.54.2'),
|
|
|
|
dependency('gobject-2.0', version: '>= 2.54'),
|
|
|
|
]
|
|
|
|
libmalcontent_private_deps = [
|
|
|
|
dependency('gio-unix-2.0', version: '>= 2.36'),
|
|
|
|
]
|
|
|
|
|
|
|
|
# FIXME: Would be good to use subdir here: https://github.com/mesonbuild/meson/issues/2969
|
|
|
|
libmalcontent_include_subdir = join_paths(libmalcontent_api_name, 'libmalcontent')
|
|
|
|
|
2020-04-04 01:00:04 +02:00
|
|
|
enums = gnome.mkenums_simple('enums',
|
|
|
|
sources: libmalcontent_headers,
|
|
|
|
install_header: true,
|
|
|
|
install_dir: join_paths(includedir, libmalcontent_include_subdir),
|
|
|
|
)
|
|
|
|
|
2019-02-26 18:43:56 +01:00
|
|
|
libmalcontent = library(libmalcontent_api_name,
|
2020-04-04 01:00:04 +02:00
|
|
|
libmalcontent_sources + libmalcontent_headers + libmalcontent_private_headers + enums,
|
2019-02-26 18:43:56 +01:00
|
|
|
dependencies: libmalcontent_public_deps + libmalcontent_private_deps,
|
|
|
|
include_directories: root_inc,
|
|
|
|
install: true,
|
|
|
|
version: meson.project_version(),
|
|
|
|
soversion: libmalcontent_api_version,
|
|
|
|
)
|
|
|
|
libmalcontent_dep = declare_dependency(
|
|
|
|
link_with: libmalcontent,
|
|
|
|
include_directories: root_inc,
|
2020-04-04 01:00:04 +02:00
|
|
|
sources: libmalcontent_headers + [enums[1]],
|
2019-02-26 18:43:56 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
# Public library bits.
|
|
|
|
install_headers(libmalcontent_headers,
|
|
|
|
subdir: libmalcontent_include_subdir,
|
|
|
|
)
|
|
|
|
|
2020-01-31 19:11:34 +01:00
|
|
|
pkgconfig.generate(libmalcontent,
|
2019-02-26 18:43:56 +01:00
|
|
|
subdirs: libmalcontent_api_name,
|
|
|
|
version: meson.project_version(),
|
|
|
|
name: 'libmalcontent',
|
|
|
|
filebase: libmalcontent_api_name,
|
|
|
|
description: 'Library providing access to parental control settings.',
|
2020-01-31 19:11:34 +01:00
|
|
|
libraries: libmalcontent_public_deps,
|
|
|
|
libraries_private: libmalcontent_private_deps,
|
2019-02-26 18:43:56 +01:00
|
|
|
)
|
|
|
|
|
2020-02-06 11:54:14 +01:00
|
|
|
libmalcontent_gir = gnome.generate_gir(libmalcontent,
|
2020-04-04 01:00:04 +02:00
|
|
|
sources: libmalcontent_sources + libmalcontent_headers + libmalcontent_private_headers + enums,
|
2019-02-26 18:43:56 +01:00
|
|
|
nsversion: libmalcontent_api_version,
|
|
|
|
namespace: 'Malcontent',
|
|
|
|
symbol_prefix: 'mct_',
|
|
|
|
identifier_prefix: 'Mct',
|
|
|
|
export_packages: 'libmalcontent',
|
|
|
|
includes: ['GObject-2.0', 'Gio-2.0'],
|
|
|
|
install: true,
|
2019-04-24 13:44:50 +02:00
|
|
|
dependencies: libmalcontent_dep,
|
2019-02-26 18:43:56 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
subdir('tests')
|