Documentation/Labs/SlicerConfigAndUseSlicerTweaks

From Slicer Wiki
Revision as of 23:24, 6 September 2015 by Fbudin (talk | contribs) (→‎Use-cases)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < Documentation < Labs < SlicerConfigAndUseSlicerTweaks

Overview

This page describes possible improvements to the SlicerConfig.cmake and UseSlicer.cmake files. These files are used when calling:

find_package(Slicer REQUIRED)
include(${Slicer_USE_FILE})

The idea is to re-factor these files to avoid extension developers to implement clever work around and hacks for their use-cases, and facilitate overall maintenance.

Use-cases

SPHARM-PDM

Extension: https://github.com/NIRALUser/SPHARM-PDM/blob/master/SuperBuild.cmake

The goal is to re-use only the Slicer packaging macros without having the external projects built by Slicer included in the extension.

The Slicer extension projects are not needed by the extension because it builds a static version of these projects.

Additional improvement: One may want to include some of the Slicer libraries (e.g. VTK) but may want to compile a specific version of other libraries that are provided by Slicer (e.g. ITK). Currently, it is complicated to do this operation: one needs to unset and reset variables (e.g. ITK_DIR) since Slicer requires that certain variables are set to certain values (to the value these variables have in the built tree of Slicer). One possible improvement would be to make optional the inclusion of the external libraries Slicer builds.