I’ve compiled a custom application using the most recent Slicer commit on MacOS. In my superbuild CMakeList.txt file, I specify a default home module, currently set to Welcome:
set(Slicer_DEFAULT_HOME_MODULE “Welcome”)
When I run the application, both from the command line and after packaging, no module is opened at startup. Is this the expected behaviour? Is there somewhere else I need to set the module that should be opened at startup?
Based on what I know it should work as you expect it to work. However, usually we don’t specify this in a CMakeLists.txt file, but we use this at the time of CMake configuration. So this would be a cmake argument like this
I can confirm, too, that set(Slicer_DEFAULT_HOME_MODULE “Welcome”) works. You would include it in the top-level CMakeLists.txt file if you use the custom application template. Note that the in the custom application template, “Welcome” module is disabled, so you either need to remove it from the disabled list or choose another home module.
Changing the value in the CMakeLists.txt and re-configuring and re-building the project from the top-level will have the expected effect.
Configuring the project passing Slicer_DEFAULT_HOME_MODULE option is also expected to change the value.
Ultimately the value is configured into the header Slicer/CMake/vtkSlicerConfigure.h.in
Thank you - I can see where it should be set on line 14 of vtkSlicerConfigure.h.in, and the correct value appears in Slicer-build/vtkSlicerConfigure.h:
#define Slicer_DEFAULT_HOME_MODULE “Data”
However, I’ve tried building the full Superbuild again, and when I run the executable, it starts with a blank module panel.
In CMakeLists.txt files you only modify the default .ini file content. Delete the current .ini file if you want the application to start from default settings.