From fffd0e1e064ab1ebd2df9e28ca557aa84511f0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Mart=C3=ADnez=20de=20Bartolom=C3=A9?= Date: Wed, 2 Jun 2021 12:56:30 +0200 Subject: [PATCH] Fix and clarification for folders.source --- developing_packages/package_layout.rst | 2 +- reference/conanfile/methods.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/developing_packages/package_layout.rst b/developing_packages/package_layout.rst index bc31ab1f059..06f99b27f20 100644 --- a/developing_packages/package_layout.rst +++ b/developing_packages/package_layout.rst @@ -65,7 +65,7 @@ file when using the :ref:`CMakeDeps` generator because it wil settings = "os", "build_type", "arch" requires = "zlib/1.2.11" generators = "CMakeDeps", "CMakeToolchain" - exports_sources = "src" + exports_sources = "src*" def layout(self): self.folders.build = "cmake-build-{}".format(str(self.settings.build_type).lower()) diff --git a/reference/conanfile/methods.rst b/reference/conanfile/methods.rst index ec2c9d022fa..807de6b264d 100644 --- a/reference/conanfile/methods.rst +++ b/reference/conanfile/methods.rst @@ -1470,7 +1470,8 @@ self.folders - **self.folders.source** (Defaulted to ""): Specifies a subfolder where the sources are. The ``self.source_folder`` attribute and the *current working directory* inside the ``source(self)`` method will be set with this subfolder. It is used in the cache when running :command:`conan create` (relative to the cache source folder) as well as in a local folder when running :command:`conan source` - (relative to the local current folder). + (relative to the local current folder). Note: Both the `export_sources`, `exports` and `scm` sources will be copied to the root source + directory, being the **self.folders.source** variable the way to describe if the fetched sources are still in a subfolder. - **self.folders.build** (Defaulted to ""): Specifies a subfolder where the files from the build are. The ``self.build_folder`` attribute and the *current working directory* inside the ``build(self)`` method will be set with this subfolder. It is used in the cache when running