Salome HOME
Merge branch 'master' into V7_5_BR
[modules/paravis.git] / src / Plugins / MEDReader / IO / CMakeLists.txt
index 2ae70bfe0b08a1a69c5b122eb5c5f378c3315d51..05e7d5f8df76d7729fead035663a284e0eeb4234 100644 (file)
@@ -3,7 +3,7 @@
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,6 +23,10 @@ INCLUDE_DIRECTORIES(
   ${MED_ROOT_DIR}/include/salome
   )
 
+IF(HDF5_IS_PARALLEL)
+  ADD_DEFINITIONS("-DMEDREADER_USE_MPI")
+ENDIF(HDF5_IS_PARALLEL)
+
 SET(MEDReader_CLASSES vtkMEDReader vtkExtractGroup vtkELNOMeshFilter vtkELNOSurfaceFilter vtkELNOFilter vtkExtractCellType)
 
 SET(MEDReader_SRCS)
@@ -34,10 +38,15 @@ FOREACH(class ${MEDReader_CLASSES})
 ENDFOREACH(class)
 
 ADD_LIBRARY(MEDLoaderForPV SHARED MEDFileFieldRepresentationTree.cxx MEDTimeReq.cxx MEDUtilities.cxx vtkGenerateVectors.cxx)
-TARGET_LINK_LIBRARIES(MEDLoaderForPV ${MED_medloader} ${MEDFILE_C_LIBRARIES})
+
+IF(HDF5_IS_PARALLEL)
+  TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MED_paramedloader} ${MEDFILE_C_LIBRARIES})
+ELSE(HDF5_IS_PARALLEL)
+  TARGET_LINK_LIBRARIES(MEDLoaderForPV vtkCommonCore vtkCommonDataModel ${MED_medloader} ${MEDFILE_C_LIBRARIES})
+ENDIF(HDF5_IS_PARALLEL)
 
 VTK_MODULE_LIBRARY(vtkMEDReader ${MEDReader_SRCS})
-TARGET_LINK_LIBRARIES(vtkMEDReader MEDLoaderForPV ${MEDFILE_C_LIBRARIES}) 
+TARGET_LINK_LIBRARIES(vtkMEDReader vtkPVVTKExtensionsRendering vtkRenderingFreeType vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL vtkInteractionStyle vtkFiltersCore vtkFiltersGeneral MEDLoaderForPV ${MEDFILE_C_LIBRARIES}) 
 
 INSTALL(
   TARGETS vtkMEDReader MEDLoaderForPV