]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
meson: minor code refactoring for include directories
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 16 Mar 2022 00:03:48 +0000 (09:03 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Thu, 17 Mar 2022 07:17:10 +0000 (16:17 +0900)
The path to include directory for installation is referred by several
parts. This commit adds local variable for it.

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 5bafe574e4f7a996c27564d5fb7c2c14cfb3c634..e9eff308f5c85f8054f9e430d20e581871fed06f 100644 (file)
@@ -49,6 +49,8 @@ dependencies = [
   libudev,
 ]
 
+inc_dir = join_paths(meson.project_name(), path)
+
 # Generate enumerations for GObject fashion.
 if has_enumerations
   enum_header = '@0@-enum-types.h'.format(name)
@@ -57,7 +59,7 @@ if has_enumerations
     symbol_prefix: name,
     identifier_prefix: namespace,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
     header_prefix: '#include <@0@-enum-types.h>'.format(join_paths(path, name)),
   )
   sources += enums
@@ -71,7 +73,7 @@ if has_marshaller
     sources: '@0@-sigs-marshal.list'.format(name),
     stdinc: true,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
   )
   sources += signal_marshallers
 endif
@@ -93,7 +95,7 @@ library = library(name,
 )
 
 install_headers(headers,
-  subdir: join_paths(meson.project_name(), path),
+  subdir: inc_dir,
 )
 
 # Generate pkg-config file for development.
index 38aa2d025d279534d792baa35164e89adfc62431..b3a766a2dce9fe0e637833a3e50eec189343b88d 100644 (file)
@@ -41,6 +41,8 @@ dependencies = [
   libudev,
 ]
 
+inc_dir = join_paths(meson.project_name(), path)
+
 # Generate enumerations for GObject fashion.
 if has_enumerations
   enum_header = '@0@-enum-types.h'.format(name)
@@ -49,7 +51,7 @@ if has_enumerations
     symbol_prefix: name,
     identifier_prefix: namespace,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
     header_prefix: '#include <@0@-enum-types.h>'.format(join_paths(path, name)),
   )
   sources += enums
@@ -63,7 +65,7 @@ if has_marshaller
     sources: '@0@-sigs-marshal.list'.format(name),
     stdinc: true,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
   )
   sources += signal_marshallers
 endif
@@ -85,7 +87,7 @@ library = library(name,
 )
 
 install_headers(headers,
-  subdir: join_paths(meson.project_name(), path),
+  subdir: inc_dir,
 )
 
 # Generate pkg-config file for development.
index 3d45f7fc2b6264bfd1219493298db98395ed3b74..049bffd511c07099d4ae8b8fa900d29d31238d74 100644 (file)
@@ -47,6 +47,8 @@ dependencies = [
   libudev,
 ]
 
+inc_dir = join_paths(meson.project_name(), path)
+
 # Generate enumerations for GObject fashion.
 if has_enumerations
   enum_header = '@0@-enum-types.h'.format(name)
@@ -55,7 +57,7 @@ if has_enumerations
     symbol_prefix: name,
     identifier_prefix: namespace,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
     header_prefix: '#include <@0@-enum-types.h>'.format(join_paths(path, name)),
   )
   sources += enums
@@ -69,7 +71,7 @@ if has_marshaller
     sources: '@0@-sigs-marshal.list'.format(name),
     stdinc: true,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
   )
   sources += signal_marshallers
 endif
@@ -91,7 +93,7 @@ library = library(name,
 )
 
 install_headers(headers,
-  subdir: join_paths(meson.project_name(), path),
+  subdir: inc_dir,
 )
 
 # Generate pkg-config file for development.
index 0407f6c6d9a1779039a826b76b36c8ff6b2a7a17..5c150f9aee9c3136d9f6182367872df1be937f58 100644 (file)
@@ -80,6 +80,8 @@ dependencies = [
   alsatimer_dependency,
 ]
 
+inc_dir = join_paths(meson.project_name(), path)
+
 # Generate enumerations for GObject fashion.
 if has_enumerations
   enum_header = '@0@-enum-types.h'.format(name)
@@ -88,7 +90,7 @@ if has_enumerations
     symbol_prefix: name,
     identifier_prefix: namespace,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
     header_prefix: '#include <@0@-enum-types.h>'.format(join_paths(path, name)),
   )
   sources += enums
@@ -102,7 +104,7 @@ if has_marshaller
     sources: '@0@-sigs-marshal.list'.format(name),
     stdinc: true,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
   )
   sources += signal_marshallers
 endif
@@ -124,7 +126,7 @@ library = library(name,
 )
 
 install_headers(headers,
-  subdir: join_paths(meson.project_name(), path),
+  subdir: inc_dir,
 )
 
 # Generate pkg-config file for development.
index 7de7b2441d03e5137f3572f5401bafd7994f85fa..cc21e906d23f81eed432efc9eed3b47a498d5610 100644 (file)
@@ -61,6 +61,8 @@ dependencies = [
   libudev,
 ]
 
+inc_dir = join_paths(meson.project_name(), path)
+
 # Generate enumerations for GObject fashion.
 if has_enumerations
   enum_header = '@0@-enum-types.h'.format(name)
@@ -69,7 +71,7 @@ if has_enumerations
     symbol_prefix: name,
     identifier_prefix: namespace,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
     header_prefix: '#include <@0@-enum-types.h>'.format(join_paths(path, name)),
   )
   sources += enums
@@ -83,7 +85,7 @@ if has_marshaller
     sources: '@0@-sigs-marshal.list'.format(name),
     stdinc: true,
     install_header: true,
-    install_dir: join_paths(get_option('includedir'), meson.project_name(), path),
+    install_dir: join_paths(get_option('includedir'), inc_dir),
   )
   sources += signal_marshallers
 endif
@@ -105,7 +107,7 @@ library = library(name,
 )
 
 install_headers(headers,
-  subdir: join_paths(meson.project_name(), path),
+  subdir: inc_dir,
 )
 
 # Generate pkg-config file for development.