Salome HOME
Merge branch 'V9_2_2_BR'
[tools/yacsgen.git] / module_generator / mpicompo.py
index 2ea388d1ed4401b36ced499c7455ec9802c51c52..409179364a53e7002f35d30bb1735eea558482cd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2015  EDF R&D
+# Copyright (C) 2009-2019  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
 """
 
 import os
-from gener import Component, Invalid
-from cpp_tmpl import initService, cxxService, hxxCompo, cxxCompo
-from cpp_tmpl import exeCPP, cmake_src_compo_cpp
-from yacstypes import corba_rtn_type, corba_in_type
-import mpi_tmpl
-from cppcompo import CPPComponent
+from module_generator.gener import Component, Invalid
+from module_generator.cpp_tmpl import initService, cxxService, hxxCompo, cxxCompo
+from module_generator.cpp_tmpl import exeCPP, cmake_src_compo_cpp
+from module_generator.yacstypes import corba_rtn_type, corba_in_type
+from module_generator import mpi_tmpl
+from module_generator.cppcompo import CPPComponent
 
 try:
   from string import Template
 except:
-  from compat import Template,set
+  from module_generator.compat import Template,set
 
 class MPIComponent(CPPComponent):
   """
@@ -204,3 +204,13 @@ class MPIComponent(CPPComponent):
     if self.interfacedefs:
       idldefs = idldefs + self.interfacedefs
     return idldefs
+  
+  def additionalLibraries(self):
+    cmake_text, cmake_vars = Component.additionalLibraries(self)
+    if "MED" in self.getDependentModules():
+      cmake_vars = cmake_vars + """
+  ${MED_paramedmemcompo}
+  ${MED_paramedcouplingcorba}  
+"""
+    return cmake_text, cmake_vars
+