diff --git a/CMakeLists.txt b/CMakeLists.txt index e0c3ec7ad91..681c6e39210 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,6 +299,10 @@ CMAKE_DEPENDENT_OPTION( "Slicer_BUILD_ITKPython" OFF) mark_as_superbuild(Slicer_INSTALL_ITKPython) +set(Slicer_ITK_EXTRA_CMAKE_ARGS "" CACHE STRING "List with extra options to build ITK, i.e -DModule_XXX:BOOL=ON") +mark_as_advanced(Slicer_ITK_EXTRA_CMAKE_ARGS) +mark_as_superbuild(Slicer_ITK_EXTRA_CMAKE_ARGS) + option(Slicer_BUILD_PARAMETERSERIALIZER_SUPPORT "Build Slicer with parameter serializer support" ON) mark_as_superbuild(Slicer_BUILD_PARAMETERSERIALIZER_SUPPORT) diff --git a/SuperBuild/External_ITKv4.cmake b/SuperBuild/External_ITKv4.cmake index c5c0ce52c7c..ea2b93b6742 100644 --- a/SuperBuild/External_ITKv4.cmake +++ b/SuperBuild/External_ITKv4.cmake @@ -123,6 +123,7 @@ if(NOT DEFINED ITK_DIR AND NOT Slicer_USE_SYSTEM_${proj}) -DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR} -DZLIB_LIBRARY:FILEPATH=${ZLIB_LIBRARY} ${EXTERNAL_PROJECT_OPTIONAL_CMAKE_CACHE_ARGS} + ${Slicer_ITK_EXTRA_CMAKE_ARGS} INSTALL_COMMAND "" DEPENDS ${${proj}_DEPENDENCIES}