# Install library with co-dependant modules

**URL:** https://discourse.vtk.org/t/install-library-with-co-dependant-modules/1866
**Category:** Support
**Created:** [October 4, 2019, 12:53pm UTC](https://discourse.vtk.org/t/install-library-with-co-dependant-modules/1866 "2019-10-04T12:53:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Charles\_Gueunet](https://discourse.vtk.org/user_avatar/discourse.vtk.org/charles_gueunet/32/239_2.png) [@Charles\_Gueunet](https://discourse.vtk.org/u/Charles_Gueunet)
#### Post date: [October 4, 2019, 12:53pm UTC](https://discourse.vtk.org/t/install-library-with-co-dependant-modules/1866/1 "2019-10-04T12:53:49Z")

</div>

I have a library which have a lot of vtk modules and I am updating those to the new VTK modules.  
Some of these modules depends on each other, which means I have encountered the race condition described in [this post](https://discourse.vtk.org/t/building-vtk-modules-with-dependencies-results-in-race-condition-in-make/1711).  
The proposed solution consist of using a `NAME` and a `LIBRARY_NAME` in the **vtk.module** file as VTK seems to process differently targets and aliases internally. This works, however by doing so I can only manipulate my module through aliases and I am not able to install them anymore.  
Is there a better way to solve this race condition ?

@ben.boeckel Do you have any recommendation on the best cmake architecture to handle this kind of project ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [October 4, 2019, 7:47pm UTC](https://discourse.vtk.org/t/install-library-with-co-dependant-modules/1866/2 "2019-10-04T19:47:11Z")

</div>

I’ve provided a fix for the logic pointed out in that other thread. For working with module targets, there are a variety of functions provided (`vtk_module_link` and friends) for doing the typical `target_` CMake functions. These handle the alias and kit use cases. The module system does handle installing targets (if the arguments to do so are passed).
