]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
meson: move path to top header to metadata part topic/meson-refactor
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Thu, 31 Mar 2022 02:04:40 +0000 (11:04 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Thu, 31 Mar 2022 02:24:15 +0000 (11:24 +0900)
This commit refactors configuration related to top header for preprocessor
to reduce difference of each meson configuration.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/ctl/meson.build
src/hwdep/meson.build
src/rawmidi/meson.build
src/seq/meson.build
src/timer/meson.build

index 0e86b22d443c1d12383240ef9aded5fd97546e61..785429fc286846958db5f1cff987bde524a84686 100644 (file)
@@ -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 <alsactl.h>',
+    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,
 )
index 45941a23d617cc0e357761c6c2521c8c07ecfa15..73897a98bce6d8fb467fc5da70ec186c28c1960e 100644 (file)
@@ -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 <alsahwdep.h>',
+    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,
 )
index 69d4d82fb6171dc58a43f7b3029705c372daceac..ce55c8072406e2462ad01ce5349bcedef6aa5dee 100644 (file)
@@ -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 <alsarawmidi.h>',
+    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,
 )
index e5402db958a80a23b3c1a52e9ceaf0146262655e..4b7d23e770b1d5542915116a29d4ac839aa926d7 100644 (file)
@@ -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 <alsaseq.h>',
+    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,
 )
index 0c60f2e2b12691912f1670414c09a39a8be2f164..74aab476fdda0c584781769dd730e73c9c2a1a8d 100644 (file)
@@ -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 <alsatimer.h>',
+    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,
 )