From a68fc9120becfdc8c47f64e0ffd9f7fbd2b9b294 Mon Sep 17 00:00:00 2001 From: Anthony Lombardi Date: Mon, 21 Aug 2023 14:45:19 -0400 Subject: [PATCH] DOC: Add dev guide for building SA^M against static build of Autoscoper --- .../developer-guide/building-autoscoperm.md | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Documentation/developer-guide/building-autoscoperm.md b/Documentation/developer-guide/building-autoscoperm.md index 522fecaf..353db978 100644 --- a/Documentation/developer-guide/building-autoscoperm.md +++ b/Documentation/developer-guide/building-autoscoperm.md @@ -8,7 +8,7 @@ Being an extension of 3D Slicer, the first step is to build Slicer from source. Once Slicer is built, the next step is to build AutoscoperM. -* Clone the AutoscoperM respotory into its own directory: +* Clone the AutoscoperM repository into its own directory: * `git clone https://github.com/BrownBiomechanics/SlicerAutoscoperM.git` * Create a build directory for AutoscoperM (it is recommended to do an out of source build): * `mkdir SlicerAutoscoperM-build` @@ -22,3 +22,33 @@ Once Slicer is built, the next step is to build AutoscoperM. * Select a configuration type and build the project: * `cmake --build . --config Release` * Once the project is built, the extension can be loaded by launching the `SlicerWithSlicerAutoscoperM` executable located inside the `inner-build` folder in the build directory. + + +## Building AutoscoperM Against an Existing Autoscoper Build + +If you have already built Autoscoper, you can build AutoscoperM against that build. This is useful if you don't want to build Autoscoper every time you build AutoscoperM. + +* The first step is to build Autoscoper. The instructions for building Autoscoper can be found in the [](./building-autoscoper.md). +* Once Autoscoper is built, the next step is to build AutoscoperM. + * Clone the AutoscoperM repository into its own directory: + * `git clone https://github.com/BrownBiomechanics/SlicerAutoscoperM.git` + * Create a build directory for AutoscoperM (it is recommended to do an out of source build): + * `mkdir SlicerAutoscoperM-build` + * Configure the project with the `SlicerAutoscoperM_SUPERBUILD` option set to `OFF`: + * `cmake ../path/to/source/ -DSlicer_DIR=/path/to/Slicer-build/ -DQt5_DIR=/path/to/Qt5Config.cmake -DSlicerAutoscoperM_SUPERBUILD=OFF` + * Select a configuration type and build the project: + * `cmake --build . --config Release` +* Next, you will need to create a custom launcher settings `ini` file as shown below: +```ini +[LibraryPaths] +1\path=path/to/autoscoper-build/GLEW-install/bin +2\path=path/to/autoscoper-build/TIFF-install/bin +3\path=path/to/autoscoper-build/OpenCL-ICD-Loader-build/bin/{Release,Debug} +size=3 + +[Paths] +1\path=path/to/autoscoper-build/Autoscoper-build/bin/{Release,Debug} +size=1 +``` +* Launch Slicer with the custom launcher settings `ini` file: + * `SlicerWithSlicerAutoscoperM --launcher-additional-settings path/to/custom/launcher/settings.ini` \ No newline at end of file