diff --git a/CMake/PackageDepends/MITK_VTK_Config.cmake b/CMake/PackageDepends/MITK_VTK_Config.cmake index f225af09cc..1e5fbfac47 100644 --- a/CMake/PackageDepends/MITK_VTK_Config.cmake +++ b/CMake/PackageDepends/MITK_VTK_Config.cmake @@ -1,137 +1,138 @@ if(NOT MITK_VTK_Config_INCLUDED) set(MITK_VTK_Config_INCLUDED 1) find_package(VTK REQUIRED) if(VTK_FOUND AND NOT VTK_BUILD_SHARED_LIBS) message(FATAL_ERROR "MITK only supports a VTK which was built with shared libraries. Turn on BUILD_SHARED_LIBS in your VTK config.") endif() include(${VTK_USE_FILE}) list(APPEND ALL_INCLUDE_DIRECTORIES ${VTK_INCLUDE_DIRS}) list(APPEND ALL_LIBRARY_DIRS ${VTK_LIBRARY_DIRS}) if(VTK_FOR_MITK_LIBRARIES) list(APPEND ALL_LIBRARIES ${VTK_FOR_MITK_LIBRARIES}) else() # Libraries in mitk/Utilities may depend on VTK but # the VTK_FOR_MITK_LIBRARIES variable is not yet set. # Supply the VTK libraries manually ## VTK6_TODO Remove unneeded Libraries list(APPEND ALL_LIBRARIES vtkalglib vtkChartsCore vtkCommonColor vtkCommonComputationalGeometry vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkDICOMParser vtkDomainsChemistry vtkexoIIc vtkexpat vtkFiltersAMR vtkFiltersCore vtkFiltersExtraction vtkFiltersFlowPaths vtkFiltersGeneral vtkFiltersGeneric vtkFiltersGeometry vtkFiltersHybrid vtkFiltersHyperTree vtkFiltersImaging vtkFiltersModeling vtkFiltersParallel vtkFiltersParallelImaging vtkFiltersProgrammable vtkFiltersSelection vtkFiltersSources vtkFiltersStatistics vtkFiltersTexture vtkFiltersVerdict vtkfreetype vtkftgl vtkGeovisCore vtkgl2ps vtkhdf5 vtkhdf5_hl vtkImagingColor vtkImagingCore vtkImagingFourier vtkImagingGeneral vtkImagingHybrid vtkImagingMath vtkImagingMorphological vtkImagingSources vtkImagingStatistics vtkImagingStencil vtkInfovisCore vtkInfovisLayout vtkInteractionImage vtkInteractionStyle vtkInteractionWidgets vtkIOAMR vtkIOCore vtkIOEnSight vtkIOExodus vtkIOExport vtkIOGeometry vtkIOImage vtkIOImport vtkIOInfovis vtkIOLegacy vtkIOLSDyna vtkIOMINC vtkIOMovie vtkIONetCDF vtkIOParallel vtkIOPLY vtkIOSQL vtkIOVideo vtkIOXML vtkIOXMLParser vtkjpeg vtkjsoncpp vtklibxml2 vtkmetaio vtkNetCDF vtkNetCDF_cxx vtkoggtheora vtkParallelCore vtkpng vtkproj4 vtkRenderingAnnotation vtkRenderingContext2D vtkRenderingCore vtkRenderingFreeType vtkRenderingFreeTypeOpenGL vtkRenderingGL2PS vtkRenderingHybridOpenGL vtkRenderingImage vtkRenderingLabel vtkRenderingLOD vtkRenderingOpenGL vtkRenderingVolume vtkRenderingVolumeAMR vtkRenderingVolumeOpenGL + vtkGUISupportQtOpenGL vtksqlite vtksys vtkTestingRendering vtktiff vtkViewsContext2D vtkViewsCore vtkViewsGeovis vtkViewsInfovis vtkzlib vtkGUISupportQt vtkGUISupportQtWebkit ${VTK_JPEG_LIBRARIES} ${VTK_PNG_LIBRARIES} ${VTK_ZLIB_LIBRARIES} ${VTK_EXPAT_LIBRARIES} ${VTK_FREETYPE_LIBRARIES} ) endif() endif(NOT MITK_VTK_Config_INCLUDED) diff --git a/CMake/mitkSetupVariables.cmake b/CMake/mitkSetupVariables.cmake index bf60179055..a2ee81006e 100644 --- a/CMake/mitkSetupVariables.cmake +++ b/CMake/mitkSetupVariables.cmake @@ -1,264 +1,265 @@ if(MITK_BUILD_ALL_PLUGINS) set(MITK_BUILD_ALL_PLUGINS_OPTION "FORCE_BUILD_ALL") endif() set(LIBPOSTFIX "") # MITK_VERSION set(MITK_VERSION_MAJOR "2013") set(MITK_VERSION_MINOR "09") set(MITK_VERSION_PATCH "99") set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}") if(MITK_VERSION_PATCH STREQUAL "99") set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}") endif() # Needed early on for redirecting the BlueBerry documentation output dir set(MITK_DOXYGEN_OUTPUT_DIR ${PROJECT_BINARY_DIR}/Documentation/Doxygen CACHE PATH "Output directory for doxygen generated documentation." ) #----------------------------------- # Configuration of module system #----------------------------------- set(MODULES_CONF_DIRNAME modulesConf) set(MODULES_CONF_DIRS ${MITK_BINARY_DIR}/${MODULES_CONF_DIRNAME}) if(NOT UNIX AND NOT MINGW) set(MITK_WIN32_FORCE_STATIC "STATIC" CACHE INTERNAL "Use this variable to always build static libraries on non-unix platforms") endif() # build the MITK_INCLUDE_DIRS variable set(MITK_INCLUDE_DIRS ${ITK_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} # contains mitkConfig.h and similar files ${MODULES_CONF_DIRS} # contains module *Exports.h files ) set(CORE_DIRECTORIES Common DataManagement Algorithms IO Rendering Interactions Controllers Service) foreach(d ${CORE_DIRECTORIES}) list(APPEND MITK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/Core/Code/${d}) endforeach() #list(APPEND MITK_INCLUDE_DIRS #${ITK_INCLUDE_DIRS} #${VTK_INCLUDE_DIRS} # ) foreach(d Utilities Utilities/ipPic Utilities/mbilog) list(APPEND MITK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${d}) endforeach() list(APPEND MITK_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/Utilities/mbilog) if(WIN32) list(APPEND MITK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/ipPic/win32) endif() # additional include dirs variables set(IPSEGMENTATION_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/ipSegmentation) # variables containing librariy names set(MITK_CORE_LIBRARIES Mitk) set(VTK_FOR_MITK_LIBRARIES vtkalglib vtkChartsCore vtkCommonColor vtkCommonComputationalGeometry vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonMisc vtkCommonSystem vtkCommonTransforms vtkDICOMParser vtkDomainsChemistry vtkexoIIc vtkexpat vtkFiltersAMR vtkFiltersCore vtkFiltersExtraction vtkFiltersFlowPaths vtkFiltersGeneral vtkFiltersGeneric vtkFiltersGeometry vtkFiltersHybrid vtkFiltersHyperTree vtkFiltersImaging vtkFiltersModeling vtkFiltersParallel vtkFiltersParallelImaging vtkFiltersProgrammable vtkFiltersSelection vtkFiltersSources vtkFiltersStatistics vtkFiltersTexture vtkFiltersVerdict vtkfreetype vtkftgl vtkGeovisCore vtkgl2ps vtkhdf5 vtkhdf5_hl vtkImagingColor vtkImagingCore vtkImagingFourier vtkImagingGeneral vtkImagingHybrid vtkImagingMath vtkImagingMorphological vtkImagingSources vtkImagingStatistics vtkImagingStencil vtkInfovisCore vtkInfovisLayout vtkInteractionImage vtkInteractionStyle vtkInteractionWidgets vtkIOAMR vtkIOCore vtkIOEnSight vtkIOExodus vtkIOExport vtkIOGeometry vtkIOImage vtkIOImport vtkIOInfovis vtkIOLegacy vtkIOLSDyna vtkIOMINC vtkIOMovie vtkIONetCDF vtkIOParallel vtkIOPLY vtkIOSQL vtkIOVideo vtkIOXML vtkIOXMLParser vtkjpeg vtkjsoncpp vtklibxml2 vtkmetaio vtkNetCDF vtkNetCDF_cxx vtkoggtheora vtkParallelCore vtkpng vtkproj4 vtkRenderingAnnotation vtkRenderingContext2D vtkRenderingCore vtkRenderingFreeType vtkRenderingFreeTypeOpenGL vtkRenderingGL2PS vtkRenderingHybridOpenGL vtkRenderingImage vtkRenderingLabel vtkRenderingLOD vtkRenderingOpenGL vtkRenderingVolume vtkRenderingVolumeAMR vtkRenderingVolumeOpenGL + vtkGUISupportQtOpenGL vtksqlite vtksys vtkTestingRendering vtktiff vtkViewsContext2D vtkViewsCore vtkViewsGeovis vtkViewsInfovis vtkzlib vtkGUISupportQt vtkGUISupportQtWebkit ${VTK_JPEG_LIBRARIES} ${VTK_PNG_LIBRARIES} ${VTK_ZLIB_LIBRARIES} ${VTK_EXPAT_LIBRARIES} ${VTK_FREETYPE_LIBRARIES} ) # TODO: maybe solve this with lib depends mechanism of CMake set(UTIL_FOR_MITK_LIBRARIES mbilog) set(LIBRARIES_FOR_MITK_CORE ${UTIL_FOR_MITK_LIBRARIES} ${VTK_FOR_MITK_LIBRARIES} ${ITK_LIBRARIES} ) set(MITK_LIBRARIES ${MITK_CORE_LIBRARIES} ${LIBRARIES_FOR_MITK_CORE} ) # variables used in CMake macros which are called from external projects set(MITK_VTK_LIBRARY_DIRS ${VTK_LIBRARY_DIRS}) set(MITK_ITK_LIBRARY_DIRS ${ITK_LIBRARY_DIRS}) # variables containing link directories set(MITK_LIBRARY_DIRS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) set(MITK_LINK_DIRECTORIES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${ITK_LIBRARY_DIRS} ${VTK_LIBRARY_DIRS} ${GDCM_LIBRARY_DIRS}) # Qt support if(MITK_USE_QT) find_package(Qt4 REQUIRED) set(QMITK_INCLUDE_DIRS ${MITK_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/Modules/Qmitk ${PROJECT_BINARY_DIR}/Modules/Qmitk ) set(QMITK_LIBRARIES Qmitk ${MITK_LIBRARIES}) set(QMITK_LINK_DIRECTORIES ${MITK_LINK_DIRECTORIES}) endif() if(MITK_BUILD_ALL_PLUGINS) set(MITK_BUILD_ALL_PLUGINS_OPTION "FORCE_BUILD_ALL") endif() # create a list of types for template instantiations of itk image access functions function(_create_type_seq TYPES seq_var seqdim_var) set(_seq ) set(_seq_dim ) string(REPLACE "," ";" _pixeltypes "${TYPES}") foreach(_pixeltype ${_pixeltypes}) set(_seq "${_seq}(${_pixeltype})") set(_seq_dim "${_seq_dim}((${_pixeltype},dim))") endforeach() set(${seq_var} "${_seq}" PARENT_SCOPE) set(${seqdim_var} "${_seq_dim}" PARENT_SCOPE) endfunction() set(MITK_ACCESSBYITK_PIXEL_TYPES ) set(MITK_ACCESSBYITK_PIXEL_TYPES_SEQ ) set(MITK_ACCESSBYITK_TYPES_DIMN_SEQ ) # concatenate only the simple pixel types to the MITK_ACCESSBYITK_PIXEL_TYPE_SEQ list # see Bug 12682 for detailed information foreach(_type INTEGRAL FLOATING) set(_typelist "${MITK_ACCESSBYITK_${_type}_PIXEL_TYPES}") if(_typelist) if(MITK_ACCESSBYITK_PIXEL_TYPES) set(MITK_ACCESSBYITK_PIXEL_TYPES "${MITK_ACCESSBYITK_PIXEL_TYPES},${_typelist}") else() set(MITK_ACCESSBYITK_PIXEL_TYPES "${_typelist}") endif() endif() _create_type_seq("${_typelist}" MITK_ACCESSBYITK_${_type}_PIXEL_TYPES_SEQ MITK_ACCESSBYITK_${_type}_TYPES_DIMN_SEQ) set(MITK_ACCESSBYITK_PIXEL_TYPES_SEQ "${MITK_ACCESSBYITK_PIXEL_TYPES_SEQ}${MITK_ACCESSBYITK_${_type}_PIXEL_TYPES_SEQ}") set(MITK_ACCESSBYITK_TYPES_DIMN_SEQ "${MITK_ACCESSBYITK_TYPES_DIMN_SEQ}${MITK_ACCESSBYITK_${_type}_TYPES_DIMN_SEQ}") endforeach() # separate processing of the COMPOSITE list to avoid its concatenation to to global list _create_type_seq(${MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES} MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES_SEQ MITK_ACCESSBYITK_COMPOSITE_TYPES_DIMN_SEQ) set(MITK_ACCESSBYITK_DIMENSIONS_SEQ ) string(REPLACE "," ";" _dimensions "${MITK_ACCESSBYITK_DIMENSIONS}") foreach(_dimension ${_dimensions}) set(MITK_ACCESSBYITK_DIMENSIONS_SEQ "${MITK_ACCESSBYITK_DIMENSIONS_SEQ}(${_dimension})") endforeach() diff --git a/CMakeExternals/VTK.cmake b/CMakeExternals/VTK.cmake index 2d658f220c..01d502dcdf 100644 --- a/CMakeExternals/VTK.cmake +++ b/CMakeExternals/VTK.cmake @@ -1,99 +1,100 @@ #----------------------------------------------------------------------------- # VTK #----------------------------------------------------------------------------- if(WIN32) option(VTK_USE_SYSTEM_FREETYPE OFF) else(WIN32) option(VTK_USE_SYSTEM_FREETYPE ON) endif(WIN32) # Sanity checks if(DEFINED VTK_DIR AND NOT EXISTS ${VTK_DIR}) message(FATAL_ERROR "VTK_DIR variable is defined but corresponds to non-existing directory") endif() set(proj VTK) set(proj_DEPENDENCIES ) set(VTK_DEPENDS ${proj}) if(NOT DEFINED VTK_DIR) set(additional_cmake_args ) if(MINGW) set(additional_cmake_args -DCMAKE_USE_WIN32_THREADS:BOOL=ON -DCMAKE_USE_PTHREADS:BOOL=OFF -DVTK_USE_VIDEO4WINDOWS:BOOL=OFF # no header files provided by MinGW ) endif() if(MITK_USE_Python) list(APPEND additional_cmake_args -DVTK_WRAP_PYTHON:BOOL=ON -DVTK_USE_TK:BOOL=OFF -DVTK_WINDOWS_PYTHON_DEBUGGABLE:BOOL=OFF -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE} -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR} -DPYTHON_INCLUDE_DIR2:PATH=${PYTHON_INCLUDE_DIR2} -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY} #-DPYTHON_LIBRARIES=${PYTHON_LIBRARY} #-DPYTHON_DEBUG_LIBRARIES=${PYTHON_DEBUG_LIBRARIES} ) else() list(APPEND additional_cmake_args -DVTK_WRAP_PYTHON:BOOL=OFF -DVTK_WINDOWS_PYTHON_DEBUGGABLE:BOOL=OFF ) endif() if(MITK_USE_QT) list(APPEND additional_cmake_args -DDESIRED_QT_VERSION:STRING=4 -DVTK_USE_GUISUPPORT:BOOL=ON -DVTK_USE_QVTK_QTOPENGL:BOOL=OFF -DVTK_USE_QT:BOOL=ON -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} ) endif() set(VTK_URL /home/christoph/dev/bugsquashing/vtk-6.0.0.tar.gz) set(VTK_URL_MD5 72ede4812c90bdc55172702f0cad02bb) set(VTK_PATCH_COMMAND ${CMAKE_COMMAND} -DTEMPLATE_FILE:FILEPATH=${MITK_SOURCE_DIR}/CMakeExternals/EmptyFileForPatching.dummy -DWIN32_OPENGL_RW_FILE:FILEPATH=${MITK_SOURCE_DIR}/CMakeExternals/vtkWin32OpenGLRenderWindow.cxx.vtk-5.10.patched -P ${MITK_SOURCE_DIR}/CMakeExternals/PatchVTK-5.10.cmake) ExternalProject_Add(${proj} SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src BINARY_DIR ${proj}-build PREFIX ${proj}-cmake URL ${VTK_URL} URL_MD5 ${VTK_URL_MD5} INSTALL_COMMAND "" PATCH_COMMAND ${VTK_PATCH_COMMAND} CMAKE_GENERATOR ${gen} CMAKE_ARGS ${ep_common_args} -DVTK_GROUP_QT:BOOL=ON -DVTK_Group_Qt:BOOL=ON -DVTK_WRAP_TCL:BOOL=OFF -DVTK_WRAP_PYTHON:BOOL=OFF -DVTK_WRAP_JAVA:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON -DVTK_USE_SYSTEM_FREETYPE:BOOL=${VTK_USE_SYSTEM_FREETYPE} -DVTK_LEGACY_REMOVE:BOOL=ON -DModule_vtkTestingRendering:BOOL=ON -DModule_vtkGUISupportQt:BOOL=ON -DModule_vtkGUISupportQtWebkit:BOOL=ON -DModule_vtkGUISupportQtSQL:BOOL=ON -DModule_vtkRenderingQt:BOOL=ON + -DVTK_MAKE_INSTANTIATORS:BOOL=ON ${additional_cmake_args} DEPENDS ${proj_DEPENDENCIES} ) set(VTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif()