SlicerJupyter
SlicerJupyter copied to clipboard
Missing version on configure file path
Hi Guys, I've tried to figure this one out with no success.
I am building a custom app with SlicerCAT.
The path on lines 75 and similarly below are missing the last bit with the version, looks like ${Slicer_VERSION} is evaluating to an empty string.
I've printed all cmake variables at install time and the ones with the slicer version on it are CMAKE_PROJECT_VERSION_MAJOR and CMAKE_PROJECT_VERSION_MINOR. If those are available on a common build (not inside a custom app) it may be better to use them. I can push a patch if it is the case.
Line 75 will be like this:
${CMAKE_BINARY_DIR}/${Slicer_QTLOADABLEMODULES_SHARE_DIR}/${MODULE_NAME}/${Slicer_MAIN_PROJECT_APPLICATION_NAME}-${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}/kernel-template.json
Thanks for reporting this. We should use the custom application's main project name and version for kernel name and version.
So, if Slicer_MAIN_PROJECT_VERSION is non-empty then that should be used for version in CMake:
${CMAKE_BINARY_DIR}/${Slicer_QTLOADABLEMODULES_SHARE_DIR}/${MODULE_NAME}/${Slicer_MAIN_PROJECT_APPLICATION_NAME}-${Slicer_MAIN_PROJECT_VERSION}")
If Slicer_MAIN_PROJECT_VERSION is empty then ${Slicer_VERSION} should be used.
qSlicerJupyterKernelModule.cxx should be updated accordingly, too.
Please make the updates and check if it works both when the extension is built regularly and when it is built as part of a custom application.
Thank you!