-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
-# for CMake 2.6 corrected behaviour (see "cmake --help-policy CMP0003")
-IF(
- COMMAND cmake_policy AND
- ${CMAKE_MAJOR_VERSION} EQUAL 2 AND
- ${CMAKE_MINOR_VERSION} GREATER 4
- )
- CMAKE_POLICY(SET CMP0003 NEW)
- CMAKE_POLICY(SET CMP0005 NEW)
- CMAKE_POLICY(SET CMP0011 NEW)
- CMAKE_POLICY(SET CMP0012 NEW)
-ENDIF(
- COMMAND cmake_policy AND
- ${CMAKE_MAJOR_VERSION} EQUAL 2 AND
- ${CMAKE_MINOR_VERSION} GREATER 4
+## ============
+## = Policies =
+## ============
+
+SET(
+ policies
+ CMP0015
+ CMP0020
+ CMP0042
)
+FOREACH(policy ${policies})
+ IF(POLICY ${policy})
+ CMAKE_POLICY(SET ${policy} NEW)
+ ENDIF(POLICY ${policy})
+ENDFOREACH(policy)
## ================
## = Project name =
## ============
## = Packages =
## ============
+
+# Prepare header to build shared libs (windows)
INCLUDE(GenerateExportHeader)
+# Find ITK and VTK
FIND_PACKAGE(ITK REQUIRED)
-INCLUDE(${ITK_USE_FILE})
-
FIND_PACKAGE(VTK REQUIRED)
+
+INCLUDE(${ITK_USE_FILE})
INCLUDE(${VTK_USE_FILE})
+# Do not use itk-vtk glue --> problems ahead!!!
+IF(ITKVtkGlue_LOADED)
+ MESSAGE(FATAL_ERROR "ITKVtkGlue module is available. Please re-compile your ITK without it. It could lead to nasty compilation problems... Just waiting for Kitware to solve it.")
+ENDIF(ITKVtkGlue_LOADED)
+
+SET(QT4_FOUND "0")
IF(BUILD_FINAL_APPLICATION)
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE(${QT_USE_FILE})
- FIND_PACKAGE(cpPlugins REQUIRED)
+ ## Check for required vtk-qt4 modules
+ SET(
+ vtk_required_modules
+ vtkGUISupportQt
+ vtkGUISupportQtOpenGL
+ )
+ FOREACH(vtk_module ${vtk_required_modules})
+ IF(NOT ${vtk_module}_LOADED)
+ MESSAGE(
+ FATAL_ERROR
+ "${vtk_module} module is required but not available."
+ )
+ SET(QT4_FOUND "0")
+ ENDIF(NOT ${vtk_module}_LOADED)
+ ENDFOREACH(vtk_module)
+ SET(QT4_FOUND "1")
ENDIF(BUILD_FINAL_APPLICATION)
+OPTION(USE_cpPlugins "Build cpPlugins based stuff" OFF)
+IF(USE_cpPlugins)
+ FIND_PACKAGE(cpPlugins REQUIRED)
+ENDIF(USE_cpPlugins)
+
+OPTION(USE_FrontAlgorithms "Build FrontAlgorithms based stuff" OFF)
+IF(USE_FrontAlgorithms)
+ FIND_PACKAGE(FrontAlgorithms REQUIRED)
+ENDIF(USE_FrontAlgorithms)
+
## ================================================
## = Do not allow to build inside the source tree =
## ================================================
typedef cpPlugins::Interface::DataObject TPluginData;
typedef cpPlugins::Interface::Image TPluginImage;
typedef cpPlugins::Interface::ProcessObject TPlugin;
- typedef TPlugin::TParameter TParameter;
- typedef TPlugin::TParameters TParameters;
+ typedef cpPlugins::Interface::Parameters TParameters;
typedef cpPlugins::Extensions::Visualization::MPRWithDifferentWindows TMPR;
typedef std::map< std::string, std::string > TStringMap;
std::string cpm::Plugins::SimpleFillRegion::
_GenerateData( )
{
- itk::DataObject* i1 = this->_GetInput( 0 );
- itk::DataObject* i2 = this->_GetInput( 1 );
-
- std::string r =
- "cpm::Plugins::SimpleFillRegion: itk::Image(s) dimensions not supported";
- cpmPlugins_SimpleFillRegion_Dimension( r, 2, i1, i2, _GD0 );
- else cpmPlugins_SimpleFillRegion_Dimension( r, 3, i1, i2, _GD0 );
- return( r );
+ /* TODO
+ itk::DataObject* i1 = this->_GetInput( 0 );
+ itk::DataObject* i2 = this->_GetInput( 1 );
+
+ std::string r =
+ "cpm::Plugins::SimpleFillRegion: itk::Image(s) dimensions not supported";
+ cpmPlugins_SimpleFillRegion_Dimension( r, 2, i1, i2, _GD0 );
+ else cpmPlugins_SimpleFillRegion_Dimension( r, 3, i1, i2, _GD0 );
+ return( r );
+ */
+ return( "" );
}
// -------------------------------------------------------------------------
+/*
template< unsigned int D >
std::string cpm::Plugins::SimpleFillRegion::
_GD0( )
return( "" );
}
+*/
// eof - $RCSfile$
virtual std::string _GenerateData( );
- template< unsigned int D >
- std::string _GD0( );
+ /* TODO
+ template< unsigned int D >
+ std::string _GD0( );
- template< class P1, unsigned int D >
- std::string _GD1( );
+ template< class P1, unsigned int D >
+ std::string _GD1( );
- template< class P1, class P2, unsigned int D >
- std::string _GD2( );
+ template< class P1, class P2, unsigned int D >
+ std::string _GD2( );
+ */
protected:
itk::ProcessObject::Pointer m_Filter;