- BasicImageProcessing contains apps that only depend on Core
- CMake code in BasicImageProcessing/MiniApps is basically a copy of mitkFunctionCreateCommandLineApp
- Core cannot contain apps as apps depend on CommandLine
- Move apps to a separate CoreCmdApps module
- Create build configurations and whiltelists for minimal builds with and without apps
- Mentioned In
- rMITK389bf1243c68: Merge remote-tracking branch 'origin/T27170-MinimalBuild'
rMITKa4e34a157e98: Merge branch 'T27170-MinimalBuild'
rMITK42355e69db60: Merge branch 'T27170-MinimalBuild'
rMITKbad8a11d294c: Merge branch 'T27170-MinimalBuild'
rMITK4325a085b302: Merge branch 'T27170-MinimalBuild'
# Shallow-clone latest master branch of MITK into MITK directory git clone --depth=1 https://phabricator.mitk.org/source/mitk.git MITK # Generate Ninja build script for MITK to build a minimum configuration with apps in Release mode into MITK-superbuild directory cmake -S MITK -B MITK-superbuild -G Ninja -D CMAKE_BUILD_TYPE:STRING=Release -D MITK_BUILD_CONFIGURATION:STRING=CoreCmdApps # Build MITK superbuild and configure MITK build cmake --build MITK-superbuild --target MITK-Configure # Build MITK cmake --build MITK-superbuild/MITK-build # Package MITK cmake --build MITK-superbuild/MITK-build --target package
The example above shows how to build MitkFileConverter in about 15 minutes. It uses Ninja as build system so do a sudo apt install ninja-build first. I also built the package target afterwards and it succeeded to package everything in a relocatable tarball, however, when executing the packaged MitkFileConverter, dependencies of MitkCommandline were missing. So this is something we have to investigate.
I added all the DICOM-related IO services to the whitelist and renamed the build configuration/whitelist from MinimalCmdApps to CoreCmdApps. I adapt the example above to reflect the changes.
The packaging does actually work contrary to what I wrote above, as I missed the .sh scripts that are necessary to start the actual executables. However, it does NOT copy the autoload services which is possibly the last TODO in this task.
Set MITK_WHITELIST in build configuration so the configuration in the example above is now easier/shorter. You don't have to set the MITK_WHITELIST anymore, only the MITK_BUILD_CONFIGURATION.