[Paraview] Plugins for custom apps

Eric E. Monson emonson at cs.duke.edu
Wed Jan 27 16:14:07 EST 2010


Hey Utkarsh,

I think that should probably work out fine. I'll have to play a bit to see if I can get it to work, since I've never tried that before.

I agree that if an app "needs" a plugin, it makes sense to require that it links to it at compile time. I'd still sort of like an option, though, that allows me to automatically package plugins with my binaries, but not have to build them in to my MainWindow class if they're not required for the application to function properly...

If you're building a non-static app, do the plugins imported this way still get their libraries dynamically linked at runtime, or do they get built right into the main executable?

Thanks,
-Eric


On Jan 27, 2010, at 3:07 PM, Utkarsh Ayachit wrote:

> Eric,
> 
> I am tempted to deprecate the OPTIONAL_PLUGINS and REQUIRED_PLUGINS. I
> think if a branded app needs a plugin, it should directly link against
> it (using TARGET_LINK_LIBRARIES or EXTRA_DEPENDENCIES in the
> build_paraview_client macro). and then use the PV_PLUGIN_IMPORT_INIT,
> PV_PLUGIN_IMPORT macros, as documented at the following link, to
> import the plugin into the application.
> 
> http://paraview.org/Wiki/Plugin_HowTo#Plugins_in_Static_Applications
> 
> Any opinions?
> 
> Utkarsh
> 
> On Mon, Jan 25, 2010 at 1:17 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>> Hello,
>> 
>> I have a custom ("branded") app and a custom PV plugin. I'd prefer to keep the code for these separate, just for clean development, but I want the app to "know about" the plugin so it can package them together automatically.
>> 
>> I can compile both at the same time by putting them each in their own subdirectory, and having a root CMakeLists.txt simply specifying the names of those subdirectories. But, when I list my custom plugin in the app's OPTIONAL_PLUGINS, it doesn't get packaged with the app libraries. (PointSpritePlugin does, though, as I told it to.)
>> 
>> Is there some less-naive structure I should be giving my project rather than just two separate subdirectories (and accompanying CMake files) so my app will "know about" my plugin (and maybe so they can also be built into the same "build/bin" directory, kind of like when paraview is built)?
>> 
>> Also, for clarification, the notes on the wiki for Writing_Custom_Applications says that OPTIONAL_PLUGINS should use "name of the plugin specified in the add_paraview_plugin call", but PointSpritePlugin works and it's actually the project() name rather than the add_paraview_plugin() name (which is CSCS_PointSprite_Plugin).
>> 
>> Thanks a lot,
>> -Eric
>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>> 



More information about the ParaView mailing list