Failed to build SlicerCustomAppTemplate

Hi everyone,

I tried to build a custom app using the great 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

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

Can you copy here the complete error message?

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.

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

1 Like

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:

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)
...

The fix for this has been merged into Slicer master:

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

1 Like