build: fix dependency on daemon enums required by plugins

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/686
This commit is contained in:
Aleksander Morgado
2023-01-09 10:59:55 +00:00
parent 99570090ea
commit e3667ecb56
2 changed files with 33 additions and 21 deletions

View File

@@ -178,16 +178,40 @@ libport_dep = declare_dependency(
link_with: libport,
)
# Additional vendor plugins
subdir('plugins')
# ModemManager daemon
# Daemon enums, required by plugins
headers = files(
'mm-base-bearer.h',
'mm-filter.h',
'mm-port-probe.h',
)
enums_types = 'mm-daemon-enums-types'
daemon_enums_sources = []
daemon_enums_sources += gnome.mkenums(
enums_types + '.c',
sources: headers,
c_template: build_aux_dir / enums_types + '.c.template',
fhead: '#include "mm-daemon-enums-types.h"',
)
daemon_enums_sources += gnome.mkenums(
enums_types + '.h',
sources: headers,
h_template: build_aux_dir / enums_types + '.h.template',
fhead: '#include "mm-filter.h"\n#include "mm-base-bearer.h"\n#include "mm-port-probe.h"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n',
ftail: '#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n',
)
daemon_enums_types_dep = declare_dependency(
sources: daemon_enums_sources[1],
include_directories: '.',
)
# Additional vendor plugins
subdir('plugins')
# ModemManager daemon
sources = files(
'main.c',
'mm-auth-provider.c',
@@ -231,22 +255,7 @@ sources = files(
'mm-sms-list.c',
)
enums_types = 'mm-daemon-enums-types'
sources += gnome.mkenums(
enums_types + '.c',
sources: headers,
c_template: build_aux_dir / enums_types + '.c.template',
fhead: '#include "mm-daemon-enums-types.h"',
)
sources += gnome.mkenums(
enums_types + '.h',
sources: headers,
h_template: build_aux_dir / enums_types + '.h.template',
fhead: '#include "mm-filter.h"\n#include "mm-base-bearer.h"\n#include "mm-port-probe.h"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n',
ftail: '#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n',
)
sources += daemon_enums_sources
deps = [
gmodule_dep,

View File

@@ -53,7 +53,10 @@ plugins_incs = [
plugins_inc,
]
plugins_deps = [libmm_glib_dep]
plugins_deps = [
daemon_enums_types_dep,
libmm_glib_dep,
]
if enable_mbim
plugins_deps += mbim_glib_dep