<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jul 2, 2016 at 5:09 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div><br></div></span><div>I'm actually a little unsure which set of modules that the script prints I should be using. It prints three set of modules: referenced, minimal and maximal. E.g:<br><br>Modules and their dependencies:<br>find_package(VTK COMPONENTS<br> vtkCommonColor<br> vtkCommonComputationalGeometry<br> vtkCommonCore<br> vtkCommonDataModel<br> vtkCommonExecutionModel<br> vtkCommonMath<br> vtkCommonMisc<br> vtkCommonSystem<br> vtkCommonTransforms<br> vtkFiltersCore<br> vtkFiltersGeneral<br> vtkFiltersSources<br> vtkGUISupportQt<br> vtkImagingCore<br> vtkInteractionStyle<br> vtkRenderingCore<br> vtkRenderingOpenGL<br> vtkkwiml<br>)<br>Your application code includes 18 of 189 vtk modules.<br><br>All modules referenced in the files:<br>find_package(VTK COMPONENTS<br> vtkCommonCore<br> vtkFiltersSources<br> vtkGUISupportQt<br> vtkRenderingCore<br> vtkRenderingOpenGL<br>)<br>Your application code includes 5 of 189 vtk modules.<br><br>Minimal set of modules:<br>find_package(VTK COMPONENTS<br> vtkCommonCore<br> vtkFiltersSources<br> vtkGUISupportQt<br>)<br>Your application code includes 3 of 189 vtk modules.<br><br><br></div><div>Would it be enough to use the minimal set? When would I want to use one of the other two?</div></div></div></div></blockquote><div><br></div><div>The minimal set should work. But I always use the middle set, because I want to directly link every library that contains a class that I directly utilize. If I rely on library dependencies to bring in all the libraries I use, then I will be out of luck if a future release of VTK manages to eliminate some of the dependencies I was relying on.</div><div><br></div><div>Note that the fact that this list contains an OpenGL/OpenGL2 library means extra logic is required when building the link line. I end up with a mess of cmake code that looks like this:</div><div><br></div><div> # Set VTK_LIBS to the libs I want to link</div><div><div> set(VTK_LIBS</div><div> vtkCommonCore vtkCommonDataModel vtkImagingCore</div><div> vtkIOImage vtkIOSQL</div>
<div> vtkRenderingImage vtkRenderingFreeType)</div><div> # Conditionally add these libs if present in VTK_LIBRARIES</div><div> set(VTK_FACTORY_LIBS</div><div> vtkIOMPIImage vtkIOMySQL</div>
<div> vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL</div><div> vtkRenderingOpenGL2 vtkRenderingFreeTypeOpenGL2)</div><div> foreach(TMP_LIB ${VTK_FACTORY_LIBS})</div><div> list(FIND VTK_LIBRARIES ${TMP_LIB} TMP_INDEX)</div><div> if(TMP_INDEX GREATER -1)</div><div> set(VTK_LIBS ${VTK_LIBS} ${TMP_LIB})</div><div> endif()</div><div> endforeach()</div></div></div></div></div>