# VTK on conan centre

**URL:** https://discourse.vtk.org/t/vtk-on-conan-centre/16112
**Category:** Development
**Created:** [October 28, 2025, 7:25am UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112 "2025-10-28T07:25:48Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![gnikit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gnikit/32/2624_2.png) [@gnikit](https://discourse.vtk.org/u/gnikit)
#### Post date: [October 28, 2025, 7:25am UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/1 "2025-10-28T07:25:48Z")

</div>

Hey guys, I wanted to ask if Kitware/VTK would consider/has considered adding a VTK recipe on [Conan 2.0: C and C++ Open Source Package Manager](https://conan.io/center) . There might be good reasons as to why you haven’t done so already, but nonetheless I thought I would ask since I need to use VTK on a conan project and there doesn’t seem to be a great way of doing so in conan, except from writing my own recipe (which I did).

FYI there is a recipe on GitHub but not on the conan registry, but it is slightly incomplete/outdated [see](https://github.com/darcamo/conan-vtk).

This post is more to spark a discussion on the subject and gather the community’s thoughts.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [October 28, 2025, 7:43am UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/2 "2025-10-28T07:43:30Z")

</div>

VTK maintainers are not packagers (apart the python wheel obviously) 🙂

But you definitely can add and maintain a conan recipe for VTK if you want to!

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [October 28, 2025, 1:29pm UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/3 "2025-10-28T13:29:25Z")

</div>

Hello,

I have a full-fledged working Conan 2 recipe for VTK 9.3.1 here [gammaray/conan2\_recipes/vtk/9.3.1 at build\_with\_conan · PauloCarvalhoRJ/gammaray · GitHub](https://github.com/PauloCarvalhoRJ/gammaray/tree/build_with_conan/conan2_recipes/vtk/9.3.1) . Feel free to use it, though I recommend reviewing the configuration part (the `generate()` callback) and the Qt dependency.

best,

PC

---

<div class="post-metadata">

### Author: ![gnikit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gnikit/32/2624_2.png) [@gnikit](https://discourse.vtk.org/u/gnikit)
#### Post date: [October 31, 2025, 7:24am UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/4 "2025-10-31T07:24:01Z")

</div>

> [@mwestphal](#):
>
> VTK maintainers are not packagers

Fair, I will find some time in the coming weeks to upload it to conan centre. I would be more than happy if some of the VTK maintainers chimed in the PR for quality assurance (but also security).

> [@Paulo\_Carvalho](#):
>
> I have a full-fledged working Conan 2 recipe for VTK 9.3.1 here

Awesome, thanks a lot! Surprisingly my recipe looks awfully similar

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [October 31, 2025, 7:26am UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/5 "2025-10-31T07:26:33Z")

</div>

> [@gnikit](#):
>
> VTK maintainers chimed in the PR for quality assurance (but also security).

Of course!

---

<div class="post-metadata">

### Author: ![nbeck](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/n/97f17d/32.png) [@nbeck](https://discourse.vtk.org/u/nbeck)
#### Post date: [November 13, 2025, 12:41pm UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/6 "2025-11-13T12:41:45Z")

</div>

Just for reference, there is a closed PR for a VTK recipe

> <https://github.com/conan-io/conan-center-index/pull/24808>
>
> \### Summary
> Changes to recipe: \*\*vtk/9.3.1\*\*
> 
> \### Motivation
> The Visualizat…ion Toolkit (VTK) is open source software for manipulating and displaying scientific data. It comes with state-of-the-art tools for 3D rendering, a suite of widgets for 3D interaction, and extensive 2D plotting capability.
> 
> https://vtk.org/
> https://gitlab.kitware.com/vtk/vtk
> 
> \[!\[Packaging status\](https://repology.org/badge/tiny-repos/vtk.svg)\](https://repology.org/project/vtk/versions)
> 
> \### Details
> Continues from #10776 by @paulharris with significant rewrites to tame the scope and complexity to more manageable levels. The project packages around 200 components and has about 70 dependencies (of which 56 are currently provided via Conan, 130 with transitive deps).
> \- I dropped the full YES/WANT/DONT\_WANT/NO dependency resolution, which was complex enough to warrant a suite of unit tests, imo, and replaced it with a simpler alternative, which works well enough as long as the user sticks to only YES/NO choices. 
> \- Module groups and kits are not supported. Kits "compile VTK into a smaller set of libraries" and "can be useful on platforms where VTK takes a long time to launch due to expensive disk access." Realistically, I would say supporting kits does not provide much value when static library output is available. The consumer is free to link the hundreds of modules down into a single executable if the number of shared libraries becomes a performance concern.
> \- Every module that can be built with the given set of external deps is built. Alternatively, \`want\_all\_modules\` can be set to \`False\` to build only the core modules and a specific subset of modules (and their internal dependencies) selected by the user instead.
> \- I expect the consumer to take care to link only against the relevant set of modules, since linking everything would be very unadvisable for this library. No catch-all \`VTK::VTK\` CMake target is exported for that reason (which matches the project's behavior). Instead, a poison target is included to prohibit the use of the aggregate \`vtk::vtk\` target when all modules are being built by default.
> \- The Conan component definition is almost fully dynamic to cope with the up to 200 total components exported by the project. The process is:
> 1. Gather all CMake targets defined by CMakeDeps into a map of CMake-\>Conan targets and store it for later use.
> 2. Parse the installed \`VTK-targets.cmake\` file for CMake targets and their properties. This provides the list of actually exported targets, whether they are real or interface ones, a list of internal and external \*public\* CMake target dependencies, system libs, frameworks and preprocessor defines.
> 3. Parse the \`module.json\` build output to get the list of \*private\* dependencies for each component and some extra \`implementable\`/\`implements\` metadata for autoinit header generation.
> 4. Generate autoinit headers required for static factory components defined in other modules to work. This is normally done in the project's CMake modules. The recipe implements a modified version that works for non-CMake generators as well. See the additional description in the code for more details.
> 5. Map the CMake targets to Conan targets and store the component metadata in a JSON file in the package folder for the binary package.
> 6. Apply the defined components in \`package\_info()\` and add the private external dependencies that are not covered by the \`modules.json\` file (which itself is derived from the \`module.vtk\` files in the project).
> \- All external dependencies that are available on CCI are supported and work. At least on x86\_64 Linux. I have not yet tested on other platforms.
> \- I did not add support for Python and Java wrappers or Python components in general.
> \- The recipe includes a Python script to generate the \`options/\<version\>.json\` files with \`./update\_options.py \<vtk-source-location\>\`. A \`--dump-metadata\` flag can be used to dump the metadata gathered from the \`module.vtk\` files as JSON instead, which provides a good overview of all modules and should be useful for diffing the metadata for changes for new releases. Keep in mind that many external dependencies are not listed as VTK modules, though, and are accessed directly through a \`find\_package()\` wrapper.
> 
> TODO:
> \- \[\] Add a recipe for \[VTK-m\](https://gitlab.kitware.com/vtk/vtk-m), which is basically a CUDA/HIP etc accelerated backend for VTK.
> 
> Here's a list of related PRs for optional dependencies that are currently missing from CCI:
> \- #18980
> \- #22360
> \- #23233
> \- #21296
> \- #21138
> \- #24735 - although the support in the project is still very preliminary and broken
> 
> To conclude, I would like to thank @paulharris for the very hard work on the recipe. It was tremendously helpful, even if much of it got rewritten beyond recognition. :heart:
> 
> \### Build logs
> 
> All logs are for GCC 11 on x86\_64 Linux.
> \- All external dependencies enabled (including the ones not yet available on CCI):
> - \[static\](https://gist.github.com/valgur/5404243903810bc1e92a2c12a2202e5e/raw/15acfab05c00351075395be41c971632311ba717/vtk\_full\_static\_build.log)
> - \[shared\](https://gist.github.com/valgur/5404243903810bc1e92a2c12a2202e5e/raw/15acfab05c00351075395be41c971632311ba717/vtk\_full\_shared\_build.log)
> \- All external dependencies disabled:
> - \[static\](https://gist.githubusercontent.com/valgur/5404243903810bc1e92a2c12a2202e5e/raw/15acfab05c00351075395be41c971632311ba717/vtk\_minimal\_static\_build.log)
> - \[shared\](https://gist.github.com/valgur/5404243903810bc1e92a2c12a2202e5e/raw/15acfab05c00351075395be41c971632311ba717/vtk\_minimal\_shared\_build.log)
> 
> Build times are:
> \- minimal - 6 minutes
> \- default - 15 minutes
> \- full - 17 minutes
> 
> \---
> \- \[x\] Read the \[contributing guidelines\](https://github.com/conan-io/conan-center-index/blob/master/CONTRIBUTING.md)
> \- \[x\] Checked that this PR is not a duplicate: \[list of PRs by recipe\](https://github.com/conan-io/conan-center-index/discussions/24240)
> \- \[x\] Tested locally with at least one configuration using a recent version of Conan

The same recipe can be found in [GitHub - valgur/conan-center-index: An actively maintained fork of ConanCenter with an emphasis on CV, ML and robotics capabilities on edge devices](https://github.com/valgur/conan-center-index)

---

<div class="post-metadata">

### Author: ![gnikit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gnikit/32/2624_2.png) [@gnikit](https://discourse.vtk.org/u/gnikit)
#### Post date: [February 1, 2026, 5:26pm UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/7 "2026-02-01T17:26:05Z")

</div>

Thanks for link. I’m not sure if I follow why the PR was closed. Was it because the CLA was unsigned? It’s quite strange to close and lock the thread without any further comments.

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [February 2, 2026, 2:31pm UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/8 "2026-02-02T14:31:56Z")

</div>

Hello,

In the PR comments:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/0/042487467cb6ba49d819d180c106538acf822544.png)  
It’s quite clear what was needed to be done in order to have had the PR accepted (that one Martin Valgur user needed to sign the CLA).

best,

PC

---

<div class="post-metadata">

### Author: ![gnikit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gnikit/32/2624_2.png) [@gnikit](https://discourse.vtk.org/u/gnikit)
#### Post date: [February 2, 2026, 2:52pm UTC](https://discourse.vtk.org/t/vtk-on-conan-centre/16112/9 "2026-02-02T14:52:57Z")

</div>

I’ll be pushing my local recipe on github soon. Not sure if it would be useful for others but I am happy to include anyone interested and try and merge it into conan centre.
