Refactored code to support INSTANCES as string

Modified code in meson build to support INSTANCES flag as string
type which is passed from machine layer bb file.

Tested: Tested and verified the INSTANCES value.

Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
Change-Id: I91a7610157c30abf2cbc4783350d8b0a744a6ba9
diff --git a/meson.build b/meson.build
index 7f7af29..4aedd81 100644
--- a/meson.build
+++ b/meson.build
@@ -30,11 +30,12 @@
   host_instances = get_option('host-instances')
 endif
 
-add_project_arguments(
-  cpp.get_supported_arguments([
-    '-DINSTANCES=' + host_instances,
-  ]),
-  language : 'cpp')
+conf_data = configuration_data()
+conf_data.set_quoted('INSTANCES',host_instances)
+
+configure_file(input: 'meson_config.h.in',
+               output: 'config.h',
+               configuration: conf_data)
 
 if not get_option('bic').disabled()
   add_project_arguments(