# Multi-configuration from installed VTK

**URL:** https://discourse.vtk.org/t/multi-configuration-from-installed-vtk/978
**Category:** Support
**Created:** [May 16, 2019, 7:24pm UTC](https://discourse.vtk.org/t/multi-configuration-from-installed-vtk/978 "2019-05-16T19:24:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sunderlandkyl](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sunderlandkyl/32/230_2.png) [@Sunderlandkyl](https://discourse.vtk.org/u/Sunderlandkyl)
#### Post date: [May 16, 2019, 7:24pm UTC](https://discourse.vtk.org/t/multi-configuration-from-installed-vtk/978/1 "2019-05-16T19:24:08Z")

</div>

Hi all,

Recently we’ve found that our current setup in Plus is unable to support multi-configuration builds with installed VTK.

Is there a way to set up our CMake so that this is possible?

[(Related Plus issue.)](https://github.com/PlusToolkit/PlusLib/issues/551)  
@lassoan

---

<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: [May 16, 2019, 7:37pm UTC](https://discourse.vtk.org/t/multi-configuration-from-installed-vtk/978/2 "2019-05-16T19:37:23Z")

</div>

Some questions:

- Are you using a multi-config generator to build VTK (Visual Studio or Xcode)?
- If not, are you doing completely separate builds or resetting `CMAKE_BUILD_TYPE` in the same build tree?
- What configurations are you looking to co-install? One release (be it Release, RelWithDebInfo, or MinSizeRel) and one debug (Debug)? Do you want to support all four?

---

<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: [May 16, 2019, 7:38pm UTC](https://discourse.vtk.org/t/multi-configuration-from-installed-vtk/978/3 "2019-05-16T19:38:18Z")

</div>

Oh, and is this with 8.90 or 8.2?

---

<div class="post-metadata">

### Author: ![Sunderlandkyl](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sunderlandkyl/32/230_2.png) [@Sunderlandkyl](https://discourse.vtk.org/u/Sunderlandkyl)
#### Post date: [May 16, 2019, 8:48pm UTC](https://discourse.vtk.org/t/multi-configuration-from-installed-vtk/978/4 "2019-05-16T20:48:51Z")

</div>

Hi Ben, thanks for your help.

We’re using VTK 8.2 with Visual Studio 2015.

We would like to implement to be compatible with all build configurations.

---

<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: [May 16, 2019, 8:55pm UTC](https://discourse.vtk.org/t/multi-configuration-from-installed-vtk/978/5 "2019-05-16T20:55:25Z")

</div>

- I really recommend using a single build tree for generating this (either with Visual Studio and `--config` or by switching `CMAKE_BUILD_TYPE` and rerunning the install)
- The `CMAKE_$<CONFIG>_POSTFIX` cache variable can be used to add custom suffixes based on the release. Alternatively, `VTK_CUSTOM_LIBRARY_SUFFIX` could be used if that fails.

8.2 is probably robust with these settings. If something more is necessary, we can look at supporting it properly in 8.90+ since I suspect it behaves similarly in this situation. If it isn’t enough, I recommend narrowing down the libraries you bring in by using `find_package(VTK COMPONENTS)` rather than importing every library built. Reducing how much of VTK is built is also a solution here (something probably worthwhile anyways).

I’m stepping out for a few days, but feel free to ping me and I’ll take a look when I’m back.
