# Understanding package names

**URL:** https://discourse.vtk.org/t/understanding-package-names/8508
**Category:** Support
**Created:** [May 16, 2022, 6:36pm UTC](https://discourse.vtk.org/t/understanding-package-names/8508 "2022-05-16T18:36:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![humbletang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/humbletang/32/3204_2.png) [@humbletang](https://discourse.vtk.org/u/humbletang)
#### Post date: [May 16, 2022, 6:36pm UTC](https://discourse.vtk.org/t/understanding-package-names/8508/1 "2022-05-16T18:36:46Z")

</div>

Hi there,

I’m trying to learn how to find the package name for a particular class in VTK with c++ and cmake. I feel like I’ve been going through examples and blindly following what the authors suggest should go inside the `find_package(...)` parentheses and I’d love to understand it better. One example is if I’m now trying to be able to use the `vtkStructuredGrid` class and I need to be able to include `#include <vtkStructuredGridAlgorithm.h>` what is the way I should infer the package name for the cmake lists? Thanks!

---

<div class="post-metadata">

### Author: ![Christos\_Tsolakis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/christos_tsolakis/32/2076_2.png) [@Christos\_Tsolakis](https://discourse.vtk.org/u/Christos_Tsolakis)
#### Post date: [May 16, 2022, 7:32pm UTC](https://discourse.vtk.org/t/understanding-package-names/8508/2 "2022-05-16T19:32:15Z")

</div>

“package” - or module as the VTK infrastructure calls them - naming follows the directory names of the source code. For example, `vtkStructuredGrid.h` is located at `Common/DataModel/vtkStructuredGrid.h` and the module that holds the implementation of `vtkStructuredGrid` is `VTK::CommonDataModel`.

Similarly, `vtkStructuredGridAlgorithm.h` is under `Common/ExecutionModel` thus, the corresponding module name is ` VTK::CommonExecutionModel`.

Additionally , you may use the python [script](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Utilities/Maintenance/FindNeededModules.py) `Utilities/Maintenance/FindNeededModules.py` that returns the module names needed for a given source file.

---

<div class="post-metadata">

### Author: ![humbletang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/humbletang/32/3204_2.png) [@humbletang](https://discourse.vtk.org/u/humbletang)
#### Post date: [May 16, 2022, 8:28pm UTC](https://discourse.vtk.org/t/understanding-package-names/8508/3 "2022-05-16T20:28:17Z")

</div>

oh that script is a gold mine! And overall I think this makes much more sense now. Thank you!
