diff options
Diffstat (limited to 'ttlgen.cc')
-rw-r--r-- | ttlgen.cc | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -69,6 +69,23 @@ static void includes(std::ostream& output) "; } +// If UIClass was not explicitly set already, try to autodetect it based on +// operating system. +#ifndef UIClass + #ifdef __linux__ + #define UIClass "X11UI" + #elif _WIN32 + #define UIClass "WindowsUI" + #elif __APPLE__ + #define UIClass "CocoaUI" + #elif __FreeBSD__ + #define UIClass "X11UI" + #elif __unix__ + // All other unices (*BSD etc) + #define UIClass "X11UI" + #endif +#endif + static void ui(Plugin& plugin, const std::string& pluginfile, std::ostream& output) { if(!plugin.hasGUI()) @@ -78,7 +95,7 @@ static void ui(Plugin& plugin, const std::string& pluginfile, std::ostream& outp output << "\ <" << plugin.getURI() << "/lv2#ui>\n\ - a ui:X11UI ;\n\ + a ui:" UIClass " ;\n \ lv2:requiredFeature ui:resize ;\n\ lv2:extensionData ui:resize ;\n\ lv2:requiredFeature ui:idleInterface ;\n\ |