In all projects I've done through the years I never came across a requirement like this, though it seems so easy on paper: write a plugin for many well-known CMS's.
Obviously, each plugin-system (or extension system) is different and this requires specific bridging code through an adapter pattern. But the core should be written once. I don't expect WordPress users to use a PHP-Java bridge, and I don't expect DotNetNuke users to use a .NET-Native bridge (though that's easier conceived).
The way I see it, the core should be compilable in three main domains that cover most CMS systems:
C# and Java translate pretty well to and from each other, but C and C# is much harder. Ultimately, it would be nice to possibly add other targets, so as not to force a WordPress or WikiMedia user to install an extension prior to using a plugin.
I'm sure this has come up with other too. What's a common way of tackling such problems? Should I define a DSL first and use DMS or similar to transform? Other options?
Haxe is a sort of meta-language that compiles for different platforms: