zaphod.b
24th July 2009, 13:43
Hi all,
I have a plugin foo that I build to TARGET = $$qtLibraryTarget(foo). This implies that under Windows, the debug plugin is named food.dll (mark the trailing 'd' character).
I use Q_EXPORT_PLUGIN2(PluginName, FooClass) to export the plugin class. As the doc (http://doc.trolltech.com/4.5/qtplugin.html#Q_EXPORT_PLUGIN2) states:
The value of PluginName should correspond to the TARGET specified in the plugin's project file.
So the 1st parameter to Q_EXPORT_PLUGIN2 needs to fit the appropriate build configuration.
Of course I could use #ifdef to preprocess with a different macro parameter depending on the configuration. However, I dislike this option as it requires manual synchronization between plugin implementation source and .pro file.
Is there a better way to automagically adopt Q_EXPORT_PLUGIN2's PluginName to the TARGET?
Thank you for your help and proposals.
I have a plugin foo that I build to TARGET = $$qtLibraryTarget(foo). This implies that under Windows, the debug plugin is named food.dll (mark the trailing 'd' character).
I use Q_EXPORT_PLUGIN2(PluginName, FooClass) to export the plugin class. As the doc (http://doc.trolltech.com/4.5/qtplugin.html#Q_EXPORT_PLUGIN2) states:
The value of PluginName should correspond to the TARGET specified in the plugin's project file.
So the 1st parameter to Q_EXPORT_PLUGIN2 needs to fit the appropriate build configuration.
Of course I could use #ifdef to preprocess with a different macro parameter depending on the configuration. However, I dislike this option as it requires manual synchronization between plugin implementation source and .pro file.
Is there a better way to automagically adopt Q_EXPORT_PLUGIN2's PluginName to the TARGET?
Thank you for your help and proposals.