# 3D Slicer Custom App bundling SlicerElastix extension

**URL:** <https://discourse.slicer.org/t/3d-slicer-custom-app-bundling-slicerelastix-extension/17255>\
**Category:** Support\
**Created:** [April 22, 2021, 8:49pm UTC](https://discourse.slicer.org/t/3d-slicer-custom-app-bundling-slicerelastix-extension/17255 "2021-04-22T20:49:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marianaslicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/marianaslicer/32/8555_2.png) [@marianaslicer](https://discourse.slicer.org/u/marianaslicer)\
**Post date:** [April 22, 2021, 8:49pm UTC](https://discourse.slicer.org/t/3d-slicer-custom-app-bundling-slicerelastix-extension/17255/1 "2021-04-22T20:49:42Z")

</div>

Hi everyone,

I was able to create an executable file for my 3D Slicer Custom App following this tutorial [https://blog.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/](https://blog.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/) and with your useful suggestions.

The last step of the BUILD file is:

```bash
cmake --build . --config Release --target PACKAGE

```

What exactly does it do? I would like to share the executable file with other people, do I need to share all of the generated files? That isn’t what I wanted because I would be sending the source code…

I also already tried to build the `PACKAGE` but I’m having this error:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/a/3a0372886482e9e62075b57e08e122b39b80f6b1.png)

I would appreciate some help. Thanks

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 23, 2021, 2:18am UTC](https://discourse.slicer.org/t/3d-slicer-custom-app-bundling-slicerelastix-extension/17255/2 "2021-04-23T02:18:37Z")

</div>

> [@marianaslicer](#):
>
> What exactly does it do? I would like to share the executable file with other people, do I need to share all of the generated files?

Building the `PACKAGE` target would have the following effect:

- Build Slicer dependencies, Slicer modules as well as the Slicer executable
- Create an windows installer that you can distribute.

The C++ source files would not be distributed.

> I also already tried to build the `PACKAGE` but I’m having this error:

Based on the error message, it looks like you included the [SlicerElastix](https://github.com/lassoan/SlicerElastix/) extension and the packaging is failing.

Few questions:

- Could you confirm this is the case by sharing how you integrate it in your `CMakeLists.txt` ?
- Could you share the complete error message ?

---

<div class="post-metadata">

**Author:** ![marianaslicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/marianaslicer/32/8555_2.png) [@marianaslicer](https://discourse.slicer.org/u/marianaslicer)\
**Post date:** [April 23, 2021, 7:24am UTC](https://discourse.slicer.org/t/3d-slicer-custom-app-bundling-slicerelastix-extension/17255/3 "2021-04-23T07:24:17Z")

</div>

Hi Jean,

Thank you for your response. That is what I’m looking for.  
My source files are written in Python programming language.

To integrate the SlicerElastix extension I used the following instructions in the CMakeLists.txt:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/b/db10274edef064eb642eab1e62a82dbd044b9929.png)

Where can I find the complete error message? Please find in this link the complete message on cmd: [https://drive.google.com/file/d/1O9KdvEjxj1BX7sTg1BwTyykowcL9MACY/view?usp=sharing](https://drive.google.com/file/d/1O9KdvEjxj1BX7sTg1BwTyykowcL9MACY/view?usp=sharing)

Thank you.

---

<div class="post-metadata">

**Author:** ![marianaslicer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/marianaslicer/32/8555_2.png) [@marianaslicer](https://discourse.slicer.org/u/marianaslicer)\
**Post date:** [April 23, 2021, 8:30am UTC](https://discourse.slicer.org/t/3d-slicer-custom-app-bundling-slicerelastix-extension/17255/4 "2021-04-23T08:30:59Z")

</div>

In VS 2017 I’m getting the following error message:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/e/1e48e9e92df034b29984f4071f7ab8533a8d30e8.png)
