From f03e854b3a5a0b70af91c22e1ea456b748af37bb Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 29 Jul 2022 07:30:21 +0200 Subject: [PATCH 1/2] add docs --- reference/tools/files/basic.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/reference/tools/files/basic.rst b/reference/tools/files/basic.rst index 3c9fd19e0b1..6a0a28e45df 100644 --- a/reference/tools/files/basic.rst +++ b/reference/tools/files/basic.rst @@ -280,5 +280,15 @@ 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) \ No newline at end of file + 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 From 55500f902c85713966df6460c17c94e5bc6f5894 Mon Sep 17 00:00:00 2001 From: czoido Date: Fri, 29 Jul 2022 08:00:59 +0200 Subject: [PATCH 2/2] minor changes --- reference/tools/files/basic.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/reference/tools/files/basic.rst b/reference/tools/files/basic.rst index 6a0a28e45df..4e81260c3e0 100644 --- a/reference/tools/files/basic.rst +++ b/reference/tools/files/basic.rst @@ -290,5 +290,6 @@ among files below, this tool will select *libmath.dylib* file and therefore only *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