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><div class="gmail_quote">2009/11/28 David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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 "vtkMyFilter.h", 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 clear="all">Thanks,<br><font color="#888888"><br>David<br>
</font><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">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" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>