Salome HOME
Merge branch 'V9_2_2_BR'
[tools/yacsgen.git] / module_generator / fcompo.py
index 57968afebd63056d0fa9a300aa4d995f54469c9d..cfcb7b17ccfad21fc25ddedf417b1ecf9d002a44 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2014  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
@@ -17,8 +17,8 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-from gener import Component
-from cppcompo import CPPComponent
+from module_generator.gener import Component
+from module_generator.cppcompo import CPPComponent
 
 import platform
 archi = platform.architecture()[0]
@@ -38,8 +38,11 @@ class F77Component(CPPComponent):
    :param services: the list of services (:class:`Service`) of the component.
    :param kind: If it is given and has the value "exe", the component will be built as a standalone
       component (executable or shell script). The default is to build the component as a dynamic library.
-   :param libs: gives all the libraries options to add when linking the generated component (-L...).
-   :param rlibs: gives all the runtime libraries options to add when linking the generated component (-R...).
+   :param libs: list of the additional libraries. see *Library* class.
+      If you want to add "libmylib.so", installed in "/path/to/lib" you should use:
+         libs=[Library(name="mylib", path="/path/to/lib")]
+      For more advanced features, see the documentation of cmake / FIND_LIBRARY
+   :param rlibs: space-separated list specifying the rpath to use in installed targets
    :param sources: gives all the external source files to add in the compilation step (list of paths).
    :param exe_path: is only used when kind is "exe" and gives the path to the standalone component.
 
@@ -47,10 +50,10 @@ class F77Component(CPPComponent):
    This component is implemented as a dynamic library linked with a user's library "mylib"::
 
       >>> c1 = module_generator.F77Component('mycompo', services=[s1,],
-                                                       libs="-lmylib -Lmydir")
+                                                       libs=[[Library(name="mylib", path=mydir)])
 
   """
-  def __init__(self, name, services=None, libs="", rlibs="", 
+  def __init__(self, name, services=None, libs=[], rlibs="", 
                      kind="lib", exe_path=None, sources=None):
     CPPComponent.__init__(self, name, services, libs=libs, rlibs=rlibs, 
                                 kind=kind, exe_path=exe_path, sources=sources)