1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
27 MACRO(CREA_FIND_AND_USE_VTK)
28 #---------------------------------------------------------------------------
31 message("DFCH--VTK: CREAMacro_FindAndUseVTK.cmake: " ${CMAKE_CURRENT_LIST_FILE})
32 message("DFCH--VTK: CREAMacro_FindAndUseVTK.cmake: " ${_IMPORT_PREFIX})
39 MESSAGE ( STATUS "=======================================")
40 MESSAGE ( STATUS "Looking for VTK... found")
41 MESSAGE ( STATUS "* Dir = ${VTK_DIR}")
42 MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
43 SET(VTK_BUILD_SETTINGS_FILE OFF)
46 ## INCLUDE(${VTK_USE_FILE})
47 ## LINK_DIRECTORIES(${VTK_DIR}) #DFCH -- 16/7/2012
48 INCLUDE_DIRECTORIES(include ${VTK_INCLUDE_DIRS} )
51 add_definitions(-DUSE_WXGLCANVAS)
53 # technically those packages are not required since one can still use the Motif/X11 version and not the gtk one:
54 FIND_PACKAGE(PkgConfig)
55 pkg_check_modules (GTK2 gtk+-2.0)
56 #MESSAGE("${GTK2_INCLUDE_DIRS}")
57 INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
58 LINK_LIBRARIES(${GTK2_LIBRARIES})
59 message("EED CREAMacro_FindAndUseVTK.cmake GTK2_INCLUDE_DIRS "${GTK2_INCLUDE_DIRS} )
60 message("EED CREAMacro_FindAndUseVTK.cmake GTK2_VERSION "${GTK2_VERSION} )
61 # Can I require all my user to have the gl lib on linux, even if they do not really need it...
62 SET(WXGLCANVASLIBS "gl")
65 CREA_DEFINE( USE_VTK )
66 CREA_DEFINE( _USE_VTK_ )
68 ##EED 2017-01-01 Migration VTK7
69 IF("${VTK_MAJOR_VERSION}" LESS 6)
72 vtkFiltering # vtkImageData
73 vtkRendering # vtkProp3D
74 vtkWidgets # vtkImagePlaneWidget
75 vtkIO # vtkMetaImageReader/Writer
76 vtkImaging # filters such as vtkImageAnisotropicDiffusion3D
77 vtkGraphics # vtkContourFilter, sources
78 vtkVolumeRendering # Mappers
85 SET(VTK_LIBRARIES ${VTK_LIBRARIES} vtkIO)
88 ENDIF("${VTK_MAJOR_VERSION}" LESS 6)
91 ##EED 2017-01-01 Migration VTK7
92 #IF("${VTK_MAJOR_VERSION}" GREATER 5)
98 # vtkRenderingAnnotation
100 # vtkFiltersHyperTree
103 # vtkRenderingContext2D
108 # vtkCommonComputationalGeometry
117 # vtkRenderingFreeType
119 # vtkFiltersParallelImaging
120 # vtkImagingMorphological
122 # vtkCommonExecutionModel
128 # vtkFiltersProgrammable
129 # vtkImagingStatistics
133 # vtkFiltersSelection
141 # vtkCommonTransforms
146 # vtkFiltersStatistics
147 # vtkInteractionImage
150 # vtkDomainsChemistry
152 # vtkInteractionStyle
155 # vtkInteractionWidgets
177 # vtkFiltersExtraction
180 # vtkFiltersFlowPaths
199 ## vtkRenderingVolumeOpenGL
200 ## vtkRenderingOpenGL
202 ## vtkRenderingContextOpenGL
205 # vtkRenderingVolumeOpenGL2
206 # vtkDomainsChemistryOpenGL2
207 # vtkRenderingOpenGL2
208 # vtkRenderingGL2PSOpenGL2
209 # vtkRenderingContextOpenGL2
212 # SET(VTK_LIBRARIES ${VTK_LIBRARIES} )
214 # SET(VTK_LIBRARIES ${VTK_LIBRARIES}
221 message("EED-a vtk libraries: "${VTK_LIBRARIES})
222 message("EED-start vtk include dirs: "${VTK_INCLUDE_DIRS})
229 SET(VTK_LIBRARIES ${VTK_LIBRARIES} vtkRenderingTDx )
233 # ENDIF("${VTK_MAJOR_VERSION}" GREATER 5)
236 MARK_AS_ADVANCED(VTK_DIR)
238 message(FATAL_ERROR "VTK_DIR not found")
241 #---------------------------------------------------------------------------
242 ENDMACRO(CREA_FIND_AND_USE_VTK)