<HTML>
<HEAD>
<TITLE>Re: [Paraview] Developing plugins procedural question</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>David,<BR>
<BR>
Jerome&#8217;s suggested structure is good. &nbsp;But if you are lazy like me and just want to get the darn thing to work, simply adding <BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
to the MyFilter/plugin/CMakeLists.txt file should do the trick.<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 11/28/09 1:14 AM, &quot;J&eacute;r&ocirc;me&quot; &lt;<a href="jerome.velut@gmail.com">jerome.velut@gmail.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi,<BR>
<BR>
My own experience is the following:<BR>
I usually make a project with this directory structure:<BR>
./<BR>
./Algorithms <BR>
./Plugins<BR>
./(other stuffs)<BR>
<BR>
a global CMakeLists defines different variables:<BR>
- ALGORITHM_PATH<BR>
- PLUGIN_PATH<BR>
<BR>
A user-defined variable<BR>
- BUILD_PARAVIEW_PLUGIN<BR>
<BR>
If the latter is on, then I add SUB_DIRS( PLUGIN_PATH )<BR>
<BR>
In the Algorithm folder, a CMakeLists create a new library (say VTKAlgo lib) and set a ALGORITHM_SRC variable that<BR>
contains the cxx and h. Obvously INCLUDE_DIR is set to this path too.<BR>
In the Plugin folder, a CMakeLists build the plugin. After the ADD_PARAVIEW_PLUGIN, I add TARGET_LINK_LIBRARY( MyPlugin VTKAlgo)<BR>
<BR>
This structure is quite convenient IMHO and I use it for any new project. Final user can choose to build only the VTK lib or the ParaView plugin. For extended project with other targets (such as GIMIAS), I simply have to add a folder with properly defined CMake variable.<BR>
<BR>
HTH<BR>
Jerome<BR>
<BR>
<BR>
 <BR>
<BR>
2009/11/28 David Doria &lt;<a href="daviddoria@gmail.com">daviddoria@gmail.com</a>&gt;<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Say I have written a VTK filter and the directory structure is as follows:<BR>
.../MyFilter/MyFilter.h<BR>
.../MyFilter/MyFilter.cxx<BR>
.../MyFilter/CMakeLists.txt<BR>
<BR>
And it is built in<BR>
.../MyFilter/bin<BR>
<BR>
I now want to make a Paraview plugin for it. I would like to keep it very separate though so I can still have something to hand out to people who just want the filter, and then have something extra that I could also provide if people want the plugin. I tried to do the following:<BR>
<BR>
Make a .../MyFilter/plugin directory. <BR>
Put the MyFilter.xml and a new CMakeLists.txt in that directory.<BR>
set SERVER_MANAGER_SOURCES to ../vtkMyFilter.cxx (which is .../MyFilter/MyFilter.cxx)<BR>
<BR>
I then made .../MyFilter/plugin/bin and tried to build the plugin in this directory. The problem seems to be that since vtkMyFilter.cxx includes &quot;vtkMyFilter.h&quot;, this header cannot be found since we are no longer in the same directory that vtkMyFilter.h exists in.<BR>
<BR>
I guess ideally I would like to have a .../MyFilter/CMakeListsPlugin.txt and build it in .../MyFilter/plugin_bin, but as far as I understand cmake will only let you read the configuration from a file named exactly CMakeLists.txt.<BR>
Is there an easy solution to this? How do you guys do it? <BR>
<BR>
Thanks,<BR>
<FONT COLOR="#888888"><BR>
David<BR>
</FONT><BR>
_______________________________________________<BR>
Powered by www.kitware.com &lt;<a href="http://www.kitware.com">http://www.kitware.com</a>&gt; <BR>
<BR>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
<BR>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a><BR>
<BR>
Follow this link to subscribe/unsubscribe:<BR>
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>