Debian Codegraph @

addons/vistaio/CMakeLists.txt

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #
2 # This file is part of MIA - a toolbox for medical image analysis
3 # Copyright (c) Leipzig, Madrid 1999-2015 Gert Wollny
4 #
5 # MIA is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 #
18
19 OPTION(WITH_VISTAIO "use libvistaio" TRUE)
20
21
22 IF (WITH_VISTAIO)
23 if (STRICT_DEPENDECIES)
24 pkg_check_modules(VISTAIO REQUIRED libvistaio>=1.2.14)
25 else (STRICT_DEPENDECIES)
26 pkg_check_modules(VISTAIO libvistaio>=1.2.14)
27 endif (STRICT_DEPENDECIES)
28
29 IF( VISTAIO_FOUND )
30 DEFINE_PROPERTY(GLOBAL PROPERTY HAVE_VISTAIO_PROP BRIEF_DOCS "yeah" FULL_DOCS "yeah")
31 INCLUDE_DIRECTORIES(${VISTAIO_INCLUDE_DIRS})
32 LINK_DIRECTORIES(${VISTAIO_LIBRARY_DIRS})
33 SET(VISTAIO_SRC vista4mia.cc)
34 SET(VISTAIO4MIALIBS miacore ${VISTAIO_LIBRARIES})
35 MIA_ADD_LIBRARY(vista4mia "${VISTAIO_SRC}" "${VISTAIO4MIALIBS}")
36
37 SET(DEPS2D mia2d vista4mia)
38 SET(DEPS3D mia3d vista4mia)
39 SET(DEPSMESH miamesh vista4mia)
40
41
42 PLUGIN_WITH_TEST_AND_PREFIX2("2dimage" "io" 2dvistaio "${DEPS2D}")
43 PLUGIN_WITH_TEST_AND_PREFIX2("3dimage" "io" 3dvistaio "${DEPS3D}")
44
45
46 PLUGIN_WITH_PREFIX2("2dvf" "io" 2dvfvistaio "${DEPS2D}")
47 PLUGIN_WITH_PREFIX2("3dvf" "io" 3dvfvistaio "${DEPS3D}")
48 PLUGIN_WITH_PREFIX2("mesh" "io" vistamesh "${DEPSMESH}")
49 PLUGIN_WITH_TEST_AND_PREFIX2("2dtransform" "io" 2dtrans "${DEPS2D}" TESTLIBS mia2dtest)
50 PLUGIN_WITH_TEST_AND_PREFIX2("3dtransform" "io" 3dtrans "${DEPS3D}" )
51
52
53
54
55 ADD_EXECUTABLE(test-vista4mia test_vista4mia.cc)
56
57 SET(VISTADEPLIBS vista4mia mia3dtest mia2dtest mia3d mia2d)
58
59 TARGET_LINK_LIBRARIES(test-vista4mia ${VISTADEPLIBS} ${BOOST_UNITTEST})
60
61 SET(VISTAIO_TESTLIBS miamesh vista4mia)
62 NEW_TEST(vistaio "${VISTAIO_TESTLIBS}")
63
64 SET(INSTALL_TARGETS vista4mia)
65 INSTALL_BASE("${INSTALL_TARGETS}")
66
67 IF (WIN32)
68 ADD_TEST(vista "${CMAKE_CURRENT_SOURCE_DIR}/test-vista4mia.bat")
69 ELSE (WIN32)
70 ADD_TEST(vista test-vista4mia)
71 ENDIF(WIN32)
72
73 ENDIF( VISTAIO_FOUND )
74 ENDIF(WITH_VISTAIO)