Skip to content

Commit

Permalink
Port #2610 to develop2 (#2676)
Browse files Browse the repository at this point in the history
* add docs

* minor changes
  • Loading branch information
czoido committed Sep 6, 2022
1 parent cb1c19c commit 585598b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions reference/tools/files/basic.rst
Expand Up @@ -280,5 +280,16 @@ Usage:
from conan.tools.files import collect_libs
def package_info(self):
self.cpp_info.libdirs = ["lib", "other_libdir"] # Deafult value is 'lib'
self.cpp_info.libs = collect_libs(self)
self.cpp_info.libdirs = ["lib", "other_libdir"] # Default value is 'lib'
self.cpp_info.libs = tools.collect_libs(self)
For UNIX libraries starting with **lib**, like *libmath.a*, this tool will collect the
library name **math**. Regarding symlinks, this tool will keep only the "most generic"
file among the resolved real file and all symlinks pointing to this real file. For example
among files below, this tool will select *libmath.dylib* file and therefore only append
*math* in the returned list:

.. code-block:: shell
-rwxr-xr-x libmath.1.0.0.dylib lrwxr-xr-x libmath.1.dylib -> libmath.1.0.0.dylib
lrwxr-xr-x libmath.dylib -> libmath.1.dylib

0 comments on commit 585598b

Please sign in to comment.