Documentation/Snapshot/Developers/Tutorials/ExtensionWriting
From Slicer Wiki
Revision as of 23:18, 9 April 2012 by JChris.FillionR (talk | contribs)
Home < Documentation < Snapshot < Developers < Tutorials < ExtensionWriting
Contents
Introduction
An extension should be considered as a collection of modules.
Additional C/CXX flags
find_package(Slicer REQUIRED) # Additional C/CXX flags - Should be defined before including Slicer_USE_FILE set(ADDITIONAL_C_FLAGS "" CACHE STRING "Additional ${EXTENSION_NAME} C Flags") set(ADDITIONAL_CXX_FLAGS "" CACHE STRING "Additional ${EXTENSION_NAME} CXX Flags") include(${Slicer_USE_FILE})
License & Readme
set(EXTENSION_LICENSE_FILE ${Slicer_LICENSE_FILE}) set(EXTENSION_README_FILE ${Slicer_README_FILE}) set(EXTENSION_LICENSE_SHORT_DESCRIPTION ${Slicer_LICENSE_SHORT_DESCRIPTION})
Superbuild extension - Package external project
set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/") #set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${<EP>_DIR};<EP>;RuntimeLibraries;/") INCLUDE(${Slicer_EXTENSION_CPACK})