I’ve developed a custom Slicer-based application and included a custom scripted module called HemisphereVolumeCalculator
In my top-level CMakeLists.txt, I’ve added it using:
The module runs fine when I add its path through the application settings → Additional Module Paths. However, after building my application from the generated Safe.sln (on Windows), the module does not appear in the application interface by default.
Questions:
Is there anything else I need to do beyond setting Slicer_EXTENSION_SOURCE_DIRS to ensure the module gets built and bundled?
How can I confirm whether the module was recognized or included during the build?
Are there any additional flags (e.g., Slicer_QTSCRIPTEDMODULES_ENABLED) that I need to set manually?
The module is placed correctly under the Scripted folder, and I’ve confirmed the paths are valid. But it’s still not showing up in the UI after building the application. Let me know if you see anything I’m missing!
After re-configuring & building the project from the top-level, the CMake cache variable Slicer_EXTENSION_SOURCE_DIRS set in the inner-build CMakeCache.txt (see <top-level>/Slicer-build/CMakeCache.txt) should include the path /path/to/Modules/Scripted/HemisphereVolumeCalculator.
Could you check this is the case ?
Next, can you check that:
The text Configuring Scripted module: HemisphereVolumeCalculator is displayed when configuring the inner project
The relevant module files are copied when you force rebuild only the target CopySlicerPythonScriptFiles after opening the solution file found in the inner build directory
@jcfr
Thanks! I just updated the module’s CMakeLists.txt according to the one you shared, and after rebuilding, the module now appears in the application Before Update: