1 # MoFEM is free software: you can redistribute it and/or modify it under
2 # the terms of the GNU Lesser General Public License as published by the
3 # Free Software Foundation, either version 3 of the License, or (at your
4 # option) any later version.
6 # MoFEM is distributed in the hope that it will be useful, but WITHOUT
7 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
9 # License for more details.
11 # You should have received a copy of the GNU Lesser General Public
12 # License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
15 set(METAIO_DIR $ENV{METAIO_DIR})
19 find_library(ITKMetaIO NAMES ITKMetaIO PATHS ${METAIO_DIR}/lib)
20 find_library(itkzlib NAMES itkzlib PATHS ${METAIO_DIR}/lib/iktMetaIO)
22 include_directories(${METAIO_DIR}/include)
23 include_directories(${METAIO_DIR}/include/iktMetaIO)
24 include_directories(${METAIO_DIR}/include/iktMetaIO/Utilities)
25 add_definitions(-DWITH_METAIO)
32 PREFIX ${PROJECT_BINARY_DIR}/external/
33 GIT_REPOSITORY https://github.com/likask/MetaIO.git
36 -DBUILD_SHARED_LIBS:BOOL=OFF
37 -DCMAKE_INSTALL_PREFIX:PATH=${PROJECT_BINARY_DIR}/external/
44 include_directories(${PROJECT_BINARY_DIR}/external/include)
45 include_directories(${PROJECT_BINARY_DIR}/external/include/iktMetaIO)
46 include_directories(${PROJECT_BINARY_DIR}/external/include/iktMetaIO/Utilities)
47 add_library(ITKMetaIO STATIC IMPORTED)
48 set_property(TARGET ITKMetaIO PROPERTY IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/external/lib/libITKMetaIO.a)
49 add_dependencies(ITKMetaIO MetaIO)
50 add_library(itkzlib STATIC IMPORTED)
51 set_property(TARGET itkzlib PROPERTY IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/external/lib/iktMetaIO/libitkzlib.a)
52 add_dependencies(itkzlib MetaIO)
53 add_definitions(-DWITH_METAIO)