1 # Copyright (C) 2010-2012 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #test if we have not yet included ParaView and/or VTK configuration files
22 FIND_PACKAGE(VTK REQUIRED)
23 INCLUDE(${VTK_USE_FILE})
38 vtkMedUnstructuredGrid
49 vtkMedIntArrayInternal
59 vtkMedFamilyOnEntityOnProfile
60 vtkMedConstantAttribute
61 vtkMedVariableAttribute
63 vtkGenerateStructElement
69 foreach(class ${MedReader_CLASSES})
70 set(MedReader_SRCS ${MedReader_SRCS} ${class}.cxx)
71 set(MedReader_HDRS ${MedReader_HDRS} ${class}.h)
74 set_source_files_properties(
81 set_source_files_properties(
82 vtkMedIntArrayInternal
84 PROPERTIES WRAP_EXCLUDE 1
87 add_library(vtkMedReader ${MedReader_SRCS})
90 if(${HDF5_IS_PARALLEL})
91 set(VTK_LIBS ${VTK_LIBS} vtkParallel)
92 endif(${HDF5_IS_PARALLEL})
94 # Introducing selection for parallel compilation
95 CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
97 add_definitions( -I${CMAKE_CURRENT_BINARY_DIR} )
99 target_link_libraries(vtkMedReader ${MED_LIBRARIES} ${VTK_LIBS} ${VTK_PARALLEL} ${vtkPVServerManager})
101 set(MedReader_BUILD_Testing ${VTK_BUILD_TESTING} CACHE BOOL "Build tests for the MedReader filter")
103 if(MedReader_BUILD_Testing)
104 add_subdirectory(Testing)
105 endif(MedReader_BUILD_Testing)
109 RUNTIME DESTINATION lib/salome
110 LIBRARY DESTINATION lib/salome
111 ARCHIVE DESTINATION lib/salome
114 install(FILES ${MedReader_HDRS} DESTINATION include)
116 # -----------------------------------------------------------------------------
117 # This make it easy for other projects to get the list of files etc. in this
119 # -----------------------------------------------------------------------------
120 # needed by vtkExportKit.cmake
121 include(${VTK_CMAKE_DIR}/vtkExportKit.cmake)
122 IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
123 STRING(REGEX REPLACE "^/" "" VTK_INSTALL_PACKAGE_DIR_CM24 "${VTK_INSTALL_PACKAGE_DIR}")
124 ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
129 ${CMAKE_CURRENT_BINARY_DIR}