# Failed to build SlicerCustomAppTemplate

**URL:** <https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810>\
**Category:** Development\
**Created:** [October 17, 2019, 8:44am UTC](https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810 "2019-10-17T08:44:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rleguay](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rleguay](https://discourse.slicer.org/u/rleguay)\
**Post date:** [October 17, 2019, 8:44am UTC](https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810/1 "2019-10-17T08:44:38Z")

</div>

Hi everyone,

I tried to build a custom app using the great [SlicerCustomAppTemplate](https://github.com/KitwareMedical/SlicerCustomAppTemplate) on Windows 10 with Qt 5.12.4 and VS 2017 in 64 bits. I have Git and SVN installed (is SVN still required?).

If I checked the option `Slicer_WITH_LIBRARY_VERSION`, the compilation failed during the configuration of ModuleDescriptionParser due to `ModuleDescriptionParser_LIBRARY_PROPERTIES` variable and `set_target_properties(${lib_name} PROPERTIES ${ModuleDescriptionParser_LIBRARY_PROPERTIES})` (line 198 of SlicerExecutionModel/ModuleDescriptionParser/CMakeLists.txt)

I just uncheck this option and the compilation work like a charm.

So two questions:

- Does this option still used?
- Does this option work on Windows?

Thank you

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 17, 2019, 1:03pm UTC](https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810/2 "2019-10-17T13:03:54Z")

</div>

I don’t think the option is commonly used, but it should work. On Windows, too.

Can you copy here the complete error message?

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [October 17, 2019, 3:23pm UTC](https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810/3 "2019-10-17T15:23:53Z")

</div>

I would guess that this is somehow related to the wrong version info (Slicer vs custom app) leaking in through this option. @jcfr ??

Trying a build now to test.

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [October 17, 2019, 8:25pm UTC](https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810/4 "2019-10-17T20:25:05Z")

</div>

So, enabling this option breaks the standard Slicer build as well.

The target properties are set here:

```
if(Slicer_WITH_LIBRARY_VERSION)
  set(Slicer_LIBRARY_PROPERTIES ${Slicer_LIBRARY_PROPERTIES}
    VERSION ${Slicer_VERSION_FULL}
    SOVERSION ${Slicer_VERSION}
  )
endif()

```

But the resulting string list is:

`VERSION;SOVERSION;4.11.0`

working on a fix for this

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [October 17, 2019, 8:55pm UTC](https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810/5 "2019-10-17T20:55:59Z")

</div>

> <https://github.com/Slicer/Slicer/pull/1233>

---

<div class="post-metadata">

**Author:** ![rleguay](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rleguay](https://discourse.slicer.org/u/rleguay)\
**Post date:** [October 18, 2019, 7:53am UTC](https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810/6 "2019-10-18T07:53:20Z")

</div>

Sorry for the late answer: it took a lot of time to build Slicer (I activated the ITK Python build too).  
Even if there is a fix I put the error messages:

```auto
36>CMake Error at Libs/ITKFactoryRegistration/CMakeLists.txt:101 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/vtkAddon/CMakeLists.txt:129 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/vtkTeem/CMakeLists.txt:108 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/vtkITK/CMakeLists.txt:159 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/vtkSegmentationCore/CMakeLists.txt:98 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/FreeSurfer/CMakeLists.txt:96 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/MRML/Core/CMakeLists.txt:282 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/MRML/CLI/CMakeLists.txt:95 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/RemoteIO/CMakeLists.txt:108 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/MRML/Logic/CMakeLists.txt:116 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/MRML/DisplayableManager/CMakeLists.txt:192 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/MRML/IDImageIO/CMakeLists.txt:92 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Libs/MRML/Widgets/CMakeLists.txt:511 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at Base/Logic/CMakeLists.txt:176 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
...
36>CMake Error at CMake/SlicerMacroBuildBaseQtLibrary.cmake:212 (set_target_properties):
36> set_target_properties called with incorrect number of arguments.
36>Call Stack (most recent call first):
36> Base/QTCore/CMakeLists.txt:251 (SlicerMacroBuildBaseQtLibrary)
...

```

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [October 18, 2019, 3:02pm UTC](https://discourse.slicer.org/t/failed-to-build-slicercustomapptemplate/8810/7 "2019-10-18T15:02:58Z")

</div>

The fix for this has been merged into Slicer master:

> <https://github.com/Slicer/Slicer/commit/96a3d7240587d1a957ac5df8c962e78ec0b9074c>

You should update your custom app to use this git hash, and do a clean build with the option enabled.
