Merge branch 'introspection-error-fix' into 'master'

libmalcontent: Add enum types to fix introspection of MctManagerError

See merge request pwithnall/malcontent!55
This commit is contained in:
Philip Withnall 2020-04-03 23:39:20 +00:00
commit 8a764cc0cd
3 changed files with 11 additions and 2 deletions

View File

@ -23,5 +23,6 @@
#pragma once
#include <libmalcontent/app-filter.h>
#include <libmalcontent/enums.h>
#include <libmalcontent/manager.h>
#include <libmalcontent/session-limits.h>

View File

@ -28,8 +28,14 @@ libmalcontent_private_deps = [
# FIXME: Would be good to use subdir here: https://github.com/mesonbuild/meson/issues/2969
libmalcontent_include_subdir = join_paths(libmalcontent_api_name, 'libmalcontent')
enums = gnome.mkenums_simple('enums',
sources: libmalcontent_headers,
install_header: true,
install_dir: join_paths(includedir, libmalcontent_include_subdir),
)
libmalcontent = library(libmalcontent_api_name,
libmalcontent_sources + libmalcontent_headers + libmalcontent_private_headers,
libmalcontent_sources + libmalcontent_headers + libmalcontent_private_headers + enums,
dependencies: libmalcontent_public_deps + libmalcontent_private_deps,
include_directories: root_inc,
install: true,
@ -39,6 +45,7 @@ libmalcontent = library(libmalcontent_api_name,
libmalcontent_dep = declare_dependency(
link_with: libmalcontent,
include_directories: root_inc,
sources: libmalcontent_headers + [enums[1]],
)
# Public library bits.
@ -57,7 +64,7 @@ pkgconfig.generate(libmalcontent,
)
libmalcontent_gir = gnome.generate_gir(libmalcontent,
sources: libmalcontent_sources + libmalcontent_headers + libmalcontent_private_headers,
sources: libmalcontent_sources + libmalcontent_headers + libmalcontent_private_headers + enums,
nsversion: libmalcontent_api_version,
namespace: 'Malcontent',
symbol_prefix: 'mct_',

View File

@ -21,6 +21,7 @@ bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
includedir = join_paths(prefix, get_option('includedir'))
# FIXME: This isnt exposed in accountsservice.pc
# See https://gitlab.freedesktop.org/accountsservice/accountsservice/merge_requests/16