From: Takashi Sakamoto Date: Thu, 31 Mar 2022 02:04:40 +0000 (+0900) Subject: meson: move path to top header to metadata part X-Git-Tag: v0.3.0~233 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=7859c19dbcb1a46b0fc712ef64dbc0a616ed097f;p=alsa-gobject.git meson: move path to top header to metadata part This commit refactors configuration related to top header for preprocessor to reduce difference of each meson configuration. Signed-off-by: Takashi Sakamoto --- diff --git a/src/ctl/meson.build b/src/ctl/meson.build index 0e86b22..785429f 100644 --- a/src/ctl/meson.build +++ b/src/ctl/meson.build @@ -18,7 +18,6 @@ sources = files( ) headers = files( - 'alsactl.h', 'query.h', 'card.h', 'card-info.h', @@ -49,6 +48,9 @@ build_dirs += {'alsactl': meson.current_build_dir()} inc_dir = join_paths(meson.project_name(), path) +top_header = '@0@.h'.format(name) +headers += top_header + # Generate enumerations for GObject fashion. if has_enumerations enum_header = '@0@-enum-types.h'.format(name) @@ -59,7 +61,7 @@ if has_enumerations identifier_prefix: namespace, install_header: true, install_dir: join_paths(get_option('includedir'), inc_dir), - header_prefix: '#include ', + header_prefix: '#include <@0@>'.format(top_header), ) else enums = [] @@ -114,6 +116,6 @@ alsactl_gir = gnome.generate_gir(library, export_packages: name, dependencies: dependencies, includes: gir_includes, - header: 'alsactl.h', + header: top_header, install: true, ) diff --git a/src/hwdep/meson.build b/src/hwdep/meson.build index 45941a2..73897a9 100644 --- a/src/hwdep/meson.build +++ b/src/hwdep/meson.build @@ -14,7 +14,6 @@ sources = files( ) headers = files( - 'alsahwdep.h', 'query.h', 'device-info.h', ) @@ -41,6 +40,9 @@ build_dirs += {'alsahwdep': meson.current_build_dir()} inc_dir = join_paths(meson.project_name(), path) +top_header = '@0@.h'.format(name) +headers += top_header + # Generate enumerations for GObject fashion. if has_enumerations enum_header = '@0@-enum-types.h'.format(name) @@ -51,7 +53,7 @@ if has_enumerations identifier_prefix: namespace, install_header: true, install_dir: join_paths(get_option('includedir'), inc_dir), - header_prefix: '#include ', + header_prefix: '#include <@0@>'.format(top_header), ) else enums = [] @@ -106,6 +108,6 @@ alsahwdep_gir = gnome.generate_gir(library, export_packages: name, dependencies: dependencies, includes: gir_includes, - header: 'alsahwdep.h', + header: top_header, install: true, ) diff --git a/src/rawmidi/meson.build b/src/rawmidi/meson.build index 69d4d82..ce55c80 100644 --- a/src/rawmidi/meson.build +++ b/src/rawmidi/meson.build @@ -46,6 +46,9 @@ build_dirs += {'alsarawmidi': meson.current_build_dir()} inc_dir = join_paths(meson.project_name(), path) +top_header = '@0@.h'.format(name) +headers += top_header + # Generate enumerations for GObject fashion. if has_enumerations enum_header = '@0@-enum-types.h'.format(name) @@ -56,7 +59,7 @@ if has_enumerations identifier_prefix: namespace, install_header: true, install_dir: join_paths(get_option('includedir'), inc_dir), - header_prefix: '#include ', + header_prefix: '#include <@0@>'.format(top_header), ) else enums = [] @@ -111,6 +114,6 @@ alsarawmidi_gir = gnome.generate_gir(library, export_packages: name, dependencies: dependencies, includes: gir_includes, - header: 'alsarawmidi.h', + header: top_header, install: true, ) diff --git a/src/seq/meson.build b/src/seq/meson.build index e5402db..4b7d23e 100644 --- a/src/seq/meson.build +++ b/src/seq/meson.build @@ -33,7 +33,6 @@ sources = files( ) headers = files( - 'alsaseq.h', 'query.h', 'system-info.h', 'client-info.h', @@ -80,6 +79,9 @@ build_dirs += {'alsaseq': meson.current_build_dir()} inc_dir = join_paths(meson.project_name(), path) +top_header = '@0@.h'.format(name) +headers += top_header + # Generate enumerations for GObject fashion. if has_enumerations enum_header = '@0@-enum-types.h'.format(name) @@ -90,7 +92,7 @@ if has_enumerations identifier_prefix: namespace, install_header: true, install_dir: join_paths(get_option('includedir'), inc_dir), - header_prefix: '#include ', + header_prefix: '#include <@0@>'.format(top_header), ) else enums = [] @@ -145,6 +147,6 @@ alsaseq_gir = gnome.generate_gir(library, export_packages: name, dependencies: dependencies, includes: gir_includes, - header: 'alsaseq.h', + header: top_header, install: true, ) diff --git a/src/timer/meson.build b/src/timer/meson.build index 0c60f2e..74aab47 100644 --- a/src/timer/meson.build +++ b/src/timer/meson.build @@ -24,7 +24,6 @@ sources = files( ) headers = files( - 'alsatimer.h', 'query.h', 'device-id.h', 'device-info.h', @@ -61,6 +60,9 @@ build_dirs += {'alsatimer': meson.current_build_dir()} inc_dir = join_paths(meson.project_name(), path) +top_header = '@0@.h'.format(name) +headers += top_header + # Generate enumerations for GObject fashion. if has_enumerations enum_header = '@0@-enum-types.h'.format(name) @@ -71,7 +73,7 @@ if has_enumerations identifier_prefix: namespace, install_header: true, install_dir: join_paths(get_option('includedir'), inc_dir), - header_prefix: '#include ', + header_prefix: '#include <@0@>'.format(top_header), ) else enums = [] @@ -126,7 +128,7 @@ alsatimer_gir = gnome.generate_gir(library, export_packages: name, dependencies: dependencies, includes: gir_includes, - header: 'alsatimer.h', + header: top_header, install: true, )