1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
#
# This file is part of MIA - a toolbox for medical image analysis
# Copyright (c) Leipzig, Madrid 1999-2015 Gert Wollny
#
# MIA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
OPTION(WITH_VTKIO "enable support for VTK files" ${SEARCH_LIBS_DEFAULT})
IF(WITH_VTKIO)
if (STRICT_DEPENDECIES)
FIND_PACKAGE(VTK REQUIRED COMPONENTS IOImage IOXML IOLegacy)
else (STRICT_DEPENDECIES)
FIND_PACKAGE(VTK COMPONENTS IOImage IOXML IOLegacy)
endif (STRICT_DEPENDECIES)
IF(VTK_FOUND)
DEFINE_PROPERTY(GLOBAL PROPERTY HAVE_VTK_PROP BRIEF_DOCS "yeah" FULL_DOCS "yeah")
INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
SET(meshio_path ${PLUGIN_INSTALL_PATH}/mesh/io)
SET(vfio_path "${PLUGIN_INSTALL_PATH}/3dvf/io")
SET(imageio_path "${PLUGIN_INSTALL_PATH}/3dimage/io")
IF( ${VTK_VERSION_MAJOR} LESS 6 )
SET(SELECTED_VTK_LIBS ${VTK_LIBRARIES})
ELSE()
SET(SELECTED_VTK_LIBS ${VTK_MODULES_REQUESTED})
ENDIF()
SET(VTK_LINK_LIBS_MESH ${SELECTED_VTK_LIBS} miamesh)
SET(VTK_LINK_LIBS_3D ${SELECTED_VTK_LIBS} mia3d)
PLUGIN_WITH_TEST_AND_PREFIX2("mesh" "io" vtkmesh "${VTK_LINK_LIBS_MESH}")
target_link_libraries(mesh-io-vtkmesh ${VTK_LIBRARIES})
target_link_libraries(mesh-io-vtkmesh-common ${VTK_LIBRARIES})
target_link_libraries(test-mesh-io-vtkmesh ${VTK_LIBRARIES})
PLUGIN_WITH_TEST_AND_PREFIX2("3dvf" "io" vtkvf "${VTK_LINK_LIBS_3D}")
target_link_libraries(3dvf-io-vtkvf ${VTK_LIBRARIES})
target_link_libraries(3dvf-io-vtkvf-common ${VTK_LIBRARIES})
target_link_libraries(test-3dvf-io-vtkvf ${VTK_LIBRARIES})
PLUGIN_WITH_TEST_AND_PREFIX2("3dimage" "io" vtkimage "${VTK_LINK_LIBS_3D}")
target_link_libraries(3dimage-io-vtkimage ${VTK_LIBRARIES})
target_link_libraries(3dimage-io-vtkimage-common ${VTK_LIBRARIES})
target_link_libraries(test-3dimage-io-vtkimage ${VTK_LIBRARIES})
ELSEIF(VTK_FOUND)
MESSAGE(MESSAGE "VTK not found, disabled")
ENDIF(VTK_FOUND)
ENDIF(WITH_VTKIO)
|