[Meson] configuration to install ini
authorJaeyun <jy1210.jung@samsung.com>
Fri, 1 Feb 2019 03:53:18 +0000 (12:53 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 8 Feb 2019 03:40:31 +0000 (12:40 +0900)
add config to set sub-plugins install prefix

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
meson.build
nnstreamer.ini [deleted file]
nnstreamer.ini.in [new file with mode: 0644]

index 2373e2a..c37dfd2 100644 (file)
@@ -35,11 +35,15 @@ plugins_install_dir = join_paths(nnstreamer_libdir, 'gstreamer-' + gst_api_veris
 subplugins_install_dir = nnstreamer_libdir
 examples_install_dir = nnstreamer_bindir
 
+# nnstreamer sub-plugins path
+subplugin_install_prefix = join_paths(nnstreamer_prefix, 'lib', 'nnstreamer')
+
 nnstreamer_conf.set('PREFIX', nnstreamer_prefix)
 nnstreamer_conf.set('EXEC_PREFIX', nnstreamer_bindir)
 nnstreamer_conf.set('LIB_INSTALL_DIR', libs_install_dir)
 nnstreamer_conf.set('GST_INSTALL_DIR', plugins_install_dir)
 nnstreamer_conf.set('INCLUDE_INSTALL_DIR', nnstreamer_includedir)
+nnstreamer_conf.set('SUBPLUGIN_INSTALL_PREFIX', subplugin_install_prefix)
 
 # Dependencies
 glib_dep = dependency('glib-2.0')
@@ -106,14 +110,19 @@ if get_option('enable-test') or get_option('install-example')
   subdir('nnstreamer_example')
 endif
 
-# Install .ini
-install_data('nnstreamer.ini', install_dir : nnstreamer_inidir)
-
 # Build unittests
 if get_option('enable-test')
   subdir('tests')
 endif
 
+# Install .ini
+configure_file(input: 'nnstreamer.ini.in', output: 'nnstreamer.ini',
+  install: true,
+  install_dir: nnstreamer_inidir,
+  configuration: nnstreamer_conf
+)
+
+# Install .pc
 configure_file(input: 'nnstreamer.pc.in', output: 'nnstreamer.pc',
   install: true,
   install_dir: join_paths(libs_install_dir, 'pkgconfig'),
diff --git a/nnstreamer.ini b/nnstreamer.ini
deleted file mode 100644 (file)
index e34ef34..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-[filter]
-filters=/usr/lib/nnstreamer/filters/
-customfilters=/usr/lib/nnstreamer/customfilters/
-
-[decoder]
-decoders=/usr/lib/nnstreamer/decoders/
diff --git a/nnstreamer.ini.in b/nnstreamer.ini.in
new file mode 100644 (file)
index 0000000..e43c62c
--- /dev/null
@@ -0,0 +1,6 @@
+[filter]
+filters=@SUBPLUGIN_INSTALL_PREFIX@/filters/
+customfilters=@SUBPLUGIN_INSTALL_PREFIX@/customfilters/
+
+[decoder]
+decoders=@SUBPLUGIN_INSTALL_PREFIX@/decoders/