Maybe https://mesonbuild.com/Reference-manual_functions.html#library_name_suffix
Cool, thanks, that appears to be it, I'll test.
I was thinking of people who download plugins from the internet, most will be for linux, will they work? I guess so far there has been no complaint, so maybe mac people don't download stuff from the internet?
I bundle most of the plugins (that don't have any too-hard-to-build dependencies like webkit) as part of the Geany bundle and they work. I just need the plugins from geany-plugins to have the same extension as those that are built with Geany. But the above link looks promising.