# Meson based port: best way to use array argument



## Peter2121 (Jun 15, 2020)

Hello,
I'm playing with a new meson-based port. I would like to use port options, grouped in a section, to define a meson option of array type. So, I would like to use something like this in port's Makefile:

```
OPTIONS_GROUP=GRP1
OPTIONS_GROUP_GRP1=OPT1 OPT2 OPT3
```
And use the results of choosing of these options as an array calling meson:

```
meson ... -Dmybuildoptions=opt1,opt2,opt3
```
So, if only two options are selected - it would be

```
meson ... -Dmybuildoptions=opt1,opt3
```
And if no options are selected it would be

```
meson ... -Dmybuildoptions=
```

I cannot find any example of doing something like this using ports framework. Could someone help me, providing an example or explaining the best way of doing it, please?


----------

