SlicerOpenIGTLink causing CustomApp build to fail

I’m trying to get a custom app to build with the SlicerOpenIGTLink remote extension included. However, I keep running into this CMake Error as seen below. If I comment out the SlicerOpenIGTLink specification in my customapp CMakeLists.txt the build completes successfully without errors.

56>-- Configuring extension directory: SlicerOpenIGTLink
56>-- Checking EXTENSION_NAME variable
56>-- Checking EXTENSION_NAME variable - NOTDEFINED
56>-- Checking MODULE_NAME variable
56>-- Checking MODULE_NAME variable - NOTDEFINED
56>-- Checking PROJECT_NAME variable
56>-- Checking PROJECT_NAME variable - SlicerOpenIGTLink
56>-- Setting EXTENSION_NAME ......................: SlicerOpenIGTLink
56>-- Checking EXTENSION_NAME variable
56>-- Checking EXTENSION_NAME variable - SlicerOpenIGTLink
56>-- Looking for decorator header qSlicerOpenIGTLinkIFModuleWidgetsPythonQtDecorators.h
56>-- Looking for decorator header qSlicerOpenIGTLinkIFModuleWidgetsPythonQtDecorators.h - Not found
56>-- Configuring Loadable module: OpenIGTLinkIF [qSlicerOpenIGTLinkIFModuleExport.h]
56>CMake Error at C:/MyCustomApp/SlicerOpenIGTLink/OpenIGTLinkIF/Testing/CMakeLists.txt:29 (list):
56>  list sub-command INSERT requires at least three arguments.
56>
56>
56>-- Looking for decorator header qSlicerOpenIGTLinkRemoteModuleWidgetsPythonQtDecorators.h
56>-- Looking for decorator header qSlicerOpenIGTLinkRemoteModuleWidgetsPythonQtDecorators.h - Not found
56>-- Configuring Loadable module: OpenIGTLinkRemote [qSlicerOpenIGTLinkRemoteModuleExport.h]

I can also build the extension separately and targeting my regular Slicer build which used defaults CMakeLists.txt configuration.

So maybe there is some Slicer build subproject dependency that I need to have checked. Is there an easy way/suggested route for finding out what this may be? Or is my issue something else?

option(Slicer_BUILD_DICOM_SUPPORT               "Build application with DICOM support"                OFF)
option(Slicer_BUILD_DIFFUSION_SUPPORT           "Build application with Diffusion support"            OFF)
option(Slicer_BUILD_EXTENSIONMANAGER_SUPPORT    "Build application with ExtensionManager support"     ON)
option(Slicer_BUILD_MULTIVOLUME_SUPPORT         "Build application with MultiVolume support"          OFF)
option(Slicer_BUILD_PARAMETERSERIALIZER_SUPPORT "Build application with parameter serializer support" ON)
option(Slicer_USE_NUMPY                         "Build application with NUMPY support"                ON)
option(Slicer_USE_PYTHONQT                      "Build application with Python support"               ON)
option(Slicer_USE_QtTesting                     "Build application with QtTesting support"            OFF)
option(Slicer_USE_SimpleITK                     "Build application with SimpleITK support"            ON)

option(Slicer_BUILD_BRAINSTOOLS                 "Build application with BRAINSTools module"           OFF)
option(Slicer_BUILD_DataStore                   "Build application with DataStore module"             OFF)
option(Slicer_BUILD_CompareVolumes              "Build application with ChangeTrackerPy module"       OFF)
option(Slicer_BUILD_LandmarkRegistration        "Build application with LandmarkRegistration module"  OFF)

Could you print values of Slicer_LAUNCH_COMMAND, launch_index, and Slicer_ADDITIONAL_LAUNCHER_SETTINGS CMake variables right before the failing line?

Slicer_LAUNCH_COMMAND = C:/SonoEQApp/Slicer-build/SonoEQ.exe;–launch
launch_index = 1
Slicer_ADDITIONAL_LAUNCHER_SETTINGS = (Blank) - Nothing printed here

Thank you, this explains the problem. When an extension is built as part of Slicer then there is no need for additional launcher settings (since everything is installed into the main application’s build tree).

Could you please test if this fix works?

Yes, that appears to solve that specific CMake error as I was able to see it configure correctly prior to the Slicer project building.

I’ve taken a little while to respond because I stopped that build from continuing and decided to try with a clean build with my customapp CMakeLists.txt again since I had been playing around with other dependencies enabling/disabling them. Right now my build is running into errors because it tried to build OpenIGTLinkIO subproject (as part of SlicerOpenIGTLink) prior to the main VTK project being run. I’m using MP flags to speed up build time.

1 Like