3 MACRO(CREA_FIND_AND_USE_LIBRARIES)
5 #-----------------------------------------------------------------------------
7 INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseVTK.cmake)
8 CREA_FIND_AND_USE_VTK()
10 #-----------------------------------------------------------------------------
12 #-----------------------------------------------------------------------------
15 FIND_PACKAGE(KWWidgets)
18 MESSAGE ( STATUS "=======================================")
19 MESSAGE ( STATUS "Looking for KWWidgets... found")
20 MESSAGE ( STATUS "* Dir = ${KWWidgets_DIR}")
21 MESSAGE ( STATUS "* Version = ${KWWidgets_MAJOR_VERSION}.${KWWidgets_MINOR_VERSION}.${KWWidgets_BUILD_VERSION}")
22 INCLUDE(${KWWidgets_USE_FILE})
23 CREA_DEFINE( USE_KWWIDGETS )
24 SET(KWWIDGETS_LIBRARIES
25 ${KWWidgets_LIBRARIES}
27 MARK_AS_ADVANCED(KWWidgets_DIR)
29 message(FATAL_ERROR "KWWidgets_DIR not found")
30 ENDIF(KWWidgets_FOUND)
32 #-----------------------------------------------------------------------------
36 #-----------------------------------------------------------------------------
42 MESSAGE ( STATUS "=======================================")
43 MESSAGE ( STATUS "Looking for ITK... found")
44 MESSAGE ( STATUS "* Dir = ${ITK_DIR}")
45 MESSAGE ( STATUS "* Version = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
46 INCLUDE(${ITK_USE_FILE})
47 CREA_DEFINE( USE_ITK )
49 ITKCommon ITKIO ITKBasicFilters ITKAlgorithms
51 MARK_AS_ADVANCED(ITK_DIR)
53 message(FATAL_ERROR "ITK_DIR not found")
56 #-----------------------------------------------------------------------------
59 #-----------------------------------------------------------------------------
65 INCLUDE(${GDCM_USE_FILE})
66 CREA_DEFINE( USE_GDCM )
68 MESSAGE ( STATUS "=======================================")
69 MESSAGE ( STATUS "Looking for GDCM... found")
70 MESSAGE ( STATUS "* Dir = ${GDCM_DIR}")
71 MESSAGE ( STATUS "* Version = ${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}")
72 MESSAGE ( STATUS "* Namespace = ${GDCM_NAME_SPACE}")
74 # Test that GDCM_NAME_SPACE is **NOT** "gdcm" or will conflict with
75 # embedded gdcm in ITK and will result in hard seg faults !
77 IF (GDCM_NAME_SPACE STREQUAL "gdcm")
78 MESSAGE(FATAL_ERROR "GDCM_NAME_SPACE value is 'gdcm' which conflicts with ITK embededd gdcm namespace : rebuild gdcm with another GDCM_NAME_SPACE value")
79 ENDIF (GDCM_NAME_SPACE STREQUAL "gdcm")
82 MARK_AS_ADVANCED(GDCM_DIR)
88 # TODO : Test that GDCM was built with option "vtkgdcm"
101 #-----------------------------------------------------------------------------
103 #-----------------------------------------------------------------------------
109 INCLUDE(${GDCM_USE_FILE})
111 IF(NOT ${GDCM_MAJOR_VERSION} EQUAL 2)
112 MESSAGE(FATAL_ERROR "gdcm version 2 needed. found ${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}. Set GDCM_DIR to the gdcm version 2 directory")
113 ENDIF(NOT ${GDCM_MAJOR_VERSION} EQUAL 2)
115 CREA_DEFINE( USE_GDCM2 )
116 CREA_DEFINE_WITH_VAL( GDCM_NAME_SPACE gdcm )
118 MESSAGE ( STATUS "=======================================")
119 MESSAGE ( STATUS "Looking for GDCM2... found")
120 MESSAGE ( STATUS "* Dir = ${GDCM_DIR}")
121 MESSAGE ( STATUS "* Version = ${GDCM_MAJOR_VERSION}.${GDCM_MINOR_VERSION}.${GDCM_BUILD_VERSION}")
122 MESSAGE ( STATUS "* Namespace = ${GDCM_NAME_SPACE}")
124 # Test that GDCM_NAME_SPACE is **NOT** "gdcm" or will conflict with
125 # embedded gdcm in ITK and will result in hard seg faults !
127 IF (GDCM_NAME_SPACE STREQUAL "gdcm")
128 MESSAGE(FATAL_ERROR "GDCM_NAME_SPACE value is 'gdcm' which conflicts with ITK embededd gdcm namespace : rebuild gdcm with another GDCM_NAME_SPACE value")
129 ENDIF (GDCM_NAME_SPACE STREQUAL "gdcm")
132 MARK_AS_ADVANCED(GDCM_DIR)
138 # TODO : Test that GDCM was built with option "vtkgdcm"
151 #-----------------------------------------------------------------------------
153 #-----------------------------------------------------------------------------
155 INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseWxWidgets.cmake)
156 CREA_FIND_WXWIDGETS()
159 #-----------------------------------------------------------------------------
163 #-----------------------------------------------------------------------------
165 MESSAGE ( STATUS "=======================================")
166 FIND_PACKAGE(Doxygen REQUIRED)
167 # MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN}")
171 # MESSAGE(FATAL_ERROR "Doxygen not found. Required to build the doxygen documentation")
174 #-----------------------------------------------------------------------------
177 #-----------------------------------------------------------------------------
179 FIND_PACKAGE(LATEX REQUIRED)
180 MESSAGE ( STATUS "=======================================")
181 MESSAGE(STATUS "Looking for latex... - found ${LATEX_COMPILER}")
183 #-----------------------------------------------------------------------------
185 #-----------------------------------------------------------------------------
187 FIND_FILE(LATEX_tth_CONVERTER NAME tth tth.exe PATHS . $ENV{CREATIS}/tth_exe/ ~/Creatis/tth ~/Creatis/tth_linux)
188 IF (NOT LATEX_tth_CONVERTER)
189 MESSAGE(FATAL_ERROR "TTH not found (LATEX_tth_CONVERTER). Required to build the HTML documentation from tex source")
190 ELSE (NOT LATEX_tth_CONVERTER)
191 MESSAGE ( STATUS "=======================================")
192 MESSAGE ( STATUS "Looking for tth... - found ${LATEX_tth_CONVERTER}")
193 ENDIF(NOT LATEX_tth_CONVERTER)
194 MARK_AS_ADVANCED(LATEX_tth_CONVERTER)
196 #-----------------------------------------------------------------------------
198 #-----------------------------------------------------------------------------
200 FIND_PACKAGE(Boost REQUIRED)
202 MESSAGE ( STATUS "=======================================")
203 MESSAGE ( STATUS "Looking for boost C++ library... - found in ${Boost_INCLUDE_DIR}")
204 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
205 LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS} )
206 CREA_DEFINE( USE_BOOST )
213 MARK_AS_ADVANCED(Boost_INCLUDE_DIR)
215 MESSAGE(FATAL_ERROR "boost C++ library not found - Set Boost_INCLUDE_DIR to the directory containing boost headers")
218 #-----------------------------------------------------------------------------
221 ENDMACRO(CREA_FIND_AND_USE_LIBRARIES)