1 #-----------------------------------------------------------------------------
2 #OPTION(USE_VTK "Build VTK-based black boxes" OFF)
8 MESSAGE ( STATUS "VTK FOUND - VERSION = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
9 INCLUDE(${VTK_USE_FILE})
11 SET(BBTK_VTK_LIBRARIES
13 vtkImaging vtkGraphics vtkRendering vtkFiltering vtkCommon vtkWidgets
14 # LG : removed vtkIO because conflict with itktiff lib in ITKIO
16 MARK_AS_ADVANCED(VTK_DIR)
19 #-----------------------------------------------------------------------------
22 #-----------------------------------------------------------------------------
23 #OPTION(USE_ITK "Build ITK-based black boxes" OFF)
29 MESSAGE ( STATUS "ITK FOUND - VERSION = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
30 INCLUDE(${ITK_USE_FILE})
32 SET(BBTK_ITK_LIBRARIES
33 ITKCommon ITKIO ITKBasicFilters ITKAlgorithms
35 MARK_AS_ADVANCED(ITK_DIR)
36 # images compilation option
37 OPTION ( itk_IMAGE_DIM_2 "itk : Compile 2D images" ON)
38 OPTION ( itk_IMAGE_DIM_3 "itk : Compile 3D images" ON)
39 OPTION ( itk_IMAGE_DIM_4 "itk : Compile 4D images" ON)
40 OPTION ( itk_IMAGE_TYPE_CHAR "itk : Compile char images" ON)
41 OPTION ( itk_IMAGE_TYPE_UCHAR "itk : Compile unsigned char images" ON)
42 OPTION ( itk_IMAGE_TYPE_SHORT "itk : Compile short images" ON)
43 OPTION ( itk_IMAGE_TYPE_USHORT "itk : Compile unsigned short images" ON)
44 OPTION ( itk_IMAGE_TYPE_INT "itk : Compile int images" ON)
45 OPTION ( itk_IMAGE_TYPE_UINT "itk : Compile unsigned int images" ON)
46 OPTION ( itk_IMAGE_TYPE_FLOAT "itk : Compile float images" ON)
47 OPTION ( itk_IMAGE_TYPE_DOUBLE "itk : Compile double images" ON)
49 IF ( itk_IMAGE_DIM_2 )
50 ADD_DEF( BBTK_ITK_IMAGE_DIM_2 )
51 ENDIF ( itk_IMAGE_DIM_2 )
53 IF ( itk_IMAGE_DIM_3 )
54 ADD_DEF( BBTK_ITK_IMAGE_DIM_3 )
55 ENDIF ( itk_IMAGE_DIM_3 )
57 IF ( itk_IMAGE_DIM_4 )
58 ADD_DEF( BBTK_ITK_IMAGE_DIM_4 )
59 ENDIF ( itk_IMAGE_DIM_4 )
61 IF ( itk_IMAGE_TYPE_CHAR )
62 ADD_DEF( BBTK_ITK_IMAGE_TYPE_int8_t )
63 ENDIF ( itk_IMAGE_TYPE_CHAR )
65 IF ( itk_IMAGE_TYPE_UCHAR )
66 ADD_DEF( BBTK_ITK_IMAGE_TYPE_uint8_t )
67 ENDIF ( itk_IMAGE_TYPE_UCHAR )
69 IF ( itk_IMAGE_TYPE_SHORT )
70 ADD_DEF( BBTK_ITK_IMAGE_TYPE_int16_t )
71 ENDIF ( itk_IMAGE_TYPE_SHORT )
73 IF ( itk_IMAGE_TYPE_USHORT )
74 ADD_DEF( BBTK_ITK_IMAGE_TYPE_uint16_t )
75 ENDIF ( itk_IMAGE_TYPE_USHORT )
77 IF ( itk_IMAGE_TYPE_INT )
78 ADD_DEF( BBTK_ITK_IMAGE_TYPE_int32_t )
79 ENDIF ( itk_IMAGE_TYPE_INT )
81 IF ( itk_IMAGE_TYPE_UINT )
82 ADD_DEF( BBTK_ITK_IMAGE_TYPE_uint32_t )
83 ENDIF ( itk_IMAGE_TYPE_UINT )
85 IF ( itk_IMAGE_TYPE_FLOAT )
86 ADD_DEF( BBTK_ITK_IMAGE_TYPE_float )
87 ENDIF ( itk_IMAGE_TYPE_FLOAT )
89 IF ( itk_IMAGE_TYPE_DOUBLE )
90 ADD_DEF( BBTK_ITK_IMAGE_TYPE_double )
91 ENDIF ( itk_IMAGE_TYPE_DOUBLE )
94 #-----------------------------------------------------------------------------
96 #-----------------------------------------------------------------------------
97 #OPTION(USE_GDCM "Build GDCM-based black boxes" OFF)
103 INCLUDE(${GDCM_USE_FILE})
104 ADD_DEF( _USE_GDCM_ )
106 SET(BBTK_GDCM_LIBRARIES
107 # TO DO : USE GDCM LINK LIBRARIES !!!
108 libgdcm libgdcmjpeg8 libgdcmjpeg12libgdcmjpeg16
112 #-----------------------------------------------------------------------------
114 #-----------------------------------------------------------------------------
115 #OPTION(USE_WXWIDGETS "Build wxWidgets-based black boxes" OFF)
121 # WXWINDOWS_LIBRARY = full path to the wxWindows library and linker flags on unix
122 # CMAKE_WX_CXX_FLAGS = compiler flags for building wxWindows
123 # WXWINDOWS_INCLUDE_PATH = include path of wxWindows
124 SET(WXWINDOWS_USE_GL 1)
126 #wxWidgets build related stuff
127 SET(WXW_USE_DEBUG ON)
128 SET(WXW_USE_UNICODE OFF)
129 SET(WXW_USE_SHARED ON)
130 SET(WXW_USE_UNIV OFF)
131 SET(WXW_USE_MONO OFF)
132 SET(WXW_FILE_VERSION "28")
133 SET(WXW_VERSION "2.8")
136 # Why forcing verbosity ?
137 # SET(CMAKE_VERBOSE_MAKEFILE TRUE)
139 INCLUDE (${BBTK_DIR}/BBTKFindWX_WIN.cmake)
141 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WXWIDGETS_CXX_FLAGS}")
142 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}${WXWIDGETS_EXE_LINKER_FLAGS}")
143 ADD_DEFINITIONS( ${WXWIDGETS_DEFINITIONS} )
145 INCLUDE_DIRECTORIES(${WXWIDGETS_INCLUDE_DIR})
146 LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} )
147 SET(THE_WXWIDGETS_LIBRARIES
148 ${WXWIDGETS_LIBRARIES}
157 INCLUDE(${BBTK_DIR}/BBTKFindGTK2.cmake)
158 INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
159 LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS})
160 LINK_LIBRARIES(${GTK2_LIBRARIES})
162 # LG : Do not force but use what is installed !
163 # SET(wxWidgets_USE_LIBS base core gl)
164 FIND_PACKAGE( wxWidgets REQUIRED)
165 INCLUDE( ${wxWidgets_USE_FILE} )
166 MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE)
167 SET(THE_WXWIDGETS_LIBRARIES
169 ${wxWidgets_LIBRARIES}
173 ADD_DEF( _USE_WXWIDGETS_ )
174 SET(BBTK_WXWIDGETS_LIBRARIES
175 ${THE_WXWIDGETS_LIBRARIES}
179 #-----------------------------------------------------------------------------
183 #-----------------------------------------------------------------------------
185 FIND_PACKAGE(Doxygen REQUIRED)
186 # MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN}")
190 # MESSAGE(FATAL_ERROR "Doxygen not found. Required to build the doxygen documentation")
193 #-----------------------------------------------------------------------------
196 #-----------------------------------------------------------------------------
198 FIND_PACKAGE(LATEX REQUIRED)
199 MESSAGE(STATUS "Looking for latex... - found ${LATEX_COMPILER}")
201 #-----------------------------------------------------------------------------
203 #-----------------------------------------------------------------------------
205 FIND_FILE(LATEX_tth_CONVERTER NAME tth tth.exe PATHS . c:/Creatis/tth_exe/ ~/Creatis/tth ~/Creatis/tth_linux)
206 IF (NOT LATEX_tth_CONVERTER)
207 MESSAGE(FATAL_ERROR "TTH not found (LATEX_tth_CONVERTER). Required to build the HTML documentation from tex source")
208 ELSE (NOT LATEX_tth_CONVERTER)
209 MESSAGE(STATUS "Looking for tth... - found ${LATEX_tth_CONVERTER}")
210 ENDIF(NOT LATEX_tth_CONVERTER)
211 MARK_AS_ADVANCED(LATEX_tth_CONVERTER)
213 #-----------------------------------------------------------------------------