Salome HOME
0022327: [CEA 937] Wrong display
[modules/paravis.git] / src / Plugins / MedReader / CMakeLists.txt
index 3e535a3e654292e6c0a21f4c8cbe20fdae100013..8d71a8fd9dfe0ecfab5025967cf279d076513439 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2012  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -42,6 +42,8 @@ if(MedReader_BUILD_ParaView_Plugin)
         MESSAGE(FATAL_ERROR "Please locate ParaView." )
     ENDIF(NOT ParaView_FOUND)
     INCLUDE(${PARAVIEW_USE_FILE})
+    # Load information about VTK/ParaView modules loaded/available.
+    pv_setup_module_environment("vtkMedReader")
 else(MedReader_BUILD_ParaView_Plugin)
     FIND_PACKAGE(VTK REQUIRED)
     if(NOT VTK_FOUND)
@@ -61,16 +63,28 @@ OPTION(BUILD_SHARED_LIBS
 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH} )
 FIND_PACKAGE(MED REQUIRED)
 include_directories(${MED_INCLUDE_DIRS})
+include_directories(${MEDFILE_INCLUDE_DIRS})
+
+#
+# process all vtk-modules defined in this plugin. This generates the necessary
+# wrappings for all these modules as well.
+#
+SET(VTK_INSTALL_RUNTIME_DIR lib/salome)
+SET(VTK_INSTALL_LIBRARY_DIR lib/salome)
+SET(VTK_INSTALL_ARCHIVE_DIR lib/salome)
+
+pv_process_modules()
 
 #
 # Build the vtkMedReader
 #
-add_subdirectory(IO)
+add_subdirectory(IO)
 
 #
 # Build the parallel vtkPMedReader
 #
 set(MedReader_BUILD_PARALLEL ${VTK_USE_PARALLEL} CACHE BOOL "Build the Med Reader with parallel support.")
+# MESSAGE(${MedReader_BUILD_PARALLEL})
 
 #
 # Build the ParaView Plugin