# WrapITK file installation location

**URL:** https://discourse.itk.org/t/wrapitk-file-installation-location/2643
**Category:** Engineering
**Tags:** python
**Created:** [January 21, 2020, 8:19am UTC](https://discourse.itk.org/t/wrapitk-file-installation-location/2643 "2020-01-21T08:19:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cg2](https://discourse.itk.org/user_avatar/discourse.itk.org/cg2/32/1298_2.png) [@cg2](https://discourse.itk.org/u/cg2)
#### Post date: [January 21, 2020, 8:19am UTC](https://discourse.itk.org/t/wrapitk-file-installation-location/2643/1 "2020-01-21T08:19:39Z")

</div>

Hi everyone,

I am porting an external project that use ITKWrap to wrap its own itk-based modules to ITK 5 and I’ve some issue with the location of Wrapping scripts. The initial script was:

```
find_package(WrapITK REQUIRED)
...
itk_wrap_module("MyLib")
...

```

My problem is that cmake cannot find the macro itk\_wrap\_module. It is somewhat logical as it is nowhere in my ITK install hierarchy (Build with ITK\_WRAPPING=ON). I would expect this files to be installed in ${ITK\_INSTALL\_PREFIX}/lib/cmake/ITK-5.0/WrapITK or something like this.

I feel like I’m missing something obvious!

My configuration is: Ubuntu 16.04, ITK 5.0

Thanks a lot for your help

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [January 21, 2020, 1:52pm UTC](https://discourse.itk.org/t/wrapitk-file-installation-location/2643/2 "2020-01-21T13:52:06Z")

</div>

I think you need ITK build tree. The install tree doesn’t have all the things the build tree has. I guess wrapping code is one of them.

---

<div class="post-metadata">

### Author: ![cg2](https://discourse.itk.org/user_avatar/discourse.itk.org/cg2/32/1298_2.png) [@cg2](https://discourse.itk.org/u/cg2)
#### Post date: [January 21, 2020, 3:30pm UTC](https://discourse.itk.org/t/wrapitk-file-installation-location/2643/3 "2020-01-21T15:30:16Z")

</div>

Thanks for your answer… The issue I have is even once you get path to the wrapping directory in your project (let’s say WRAP\_ITK\_CMAKE\_DIR = ${ITK\_SRC\_DIR}/Wrapping), it not quite enough. You need to include the main configuration file:

```
include (${WRAP_ITK_CMAKE_DIR}/ConfigureWrapping.cmake)

```

Then, this file add the generators subdirectory with CMake scripts that depends on macro in ITK source directory (${ITK\_SRC\_DIR}/cmake/itkTargetLinkLibrariesWithDynamicLookup.cmake). Thus, you need to point to this directory as well to be to include it.

All of this made me think I was missing something obvious… In ITK v5.0.0rc2 there was a WrapITKConfig.cmake.in that disappeared in ITK v5.0.0…

Regards,

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [January 21, 2020, 9:02pm UTC](https://discourse.itk.org/t/wrapitk-file-installation-location/2643/4 "2020-01-21T21:02:46Z")

</div>

@matt.mccormick should be able to answer this question better than me, and possibly @blowekamp.

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [January 22, 2020, 9:10pm UTC](https://discourse.itk.org/t/wrapitk-file-installation-location/2643/5 "2020-01-22T21:10:12Z")

</div>

> [@cg2](#):
>
> find\_package(WrapITK REQUIRED)

`WrapITK` was integrated into ITK in version 4.0, and it has enjoyed significant improvements since then.

A good overview of wrapping configuration can be found in the [ITK Software Guide](https://itk.org/ItkSoftwareGuide.pdf), Book 1, Section 9.5 “Wrapping”.
