From Slicer Wiki
Jump to: navigation, search
Home < Documentation < Labs < SlicerConfigAndUseSlicerTweaks


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

find_package(Slicer REQUIRED)

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.




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.