Provide package data dir for compiler option
This allows the code consuming data files to know where they are stored
instead of using hard coded values.
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: I353128096103a5195df5ba05c02868517903813f
diff --git a/meson.build b/meson.build
index 89ccf90..514e94c 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,14 @@
'cpp_std=c++17',
])
+# Package directory root, which will contain required data files.
+package_dir = join_paths( get_option('prefix'),
+ get_option('datadir'),
+ meson.project_name() )
+
+# Compiler option so that source knows the package directory.
+package_args = [ '-DPACKAGE_DIR="' + package_dir + '/"' ]
+
#-------------------------------------------------------------------------------
# Versioning
#-------------------------------------------------------------------------------