-# Copyright (C) 2009-2013 EDF R&D
+# Copyright (C) 2009-2015 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
# 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
: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.
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)