@@ -46,14 +46,24 @@ def _create_base_conanfile(
4646 content = f'''"""CPPython managed base ConanFile.
4747
4848This file is auto-generated by CPPython. Do not edit manually.
49- Dependencies are managed through pyproject.toml.
49+ Dependencies and layout are managed through pyproject.toml.
5050"""
5151
5252from conan import ConanFile
5353
5454
5555class CPPythonBase(ConanFile):
56- """Base ConanFile with CPPython managed dependencies."""
56+ """Base ConanFile with CPPython managed dependencies and layout."""
57+
58+ def layout(self):
59+ """CPPython managed layout for consistent paths across all platforms.
60+
61+ Uses explicit folder settings instead of cmake_layout() to avoid
62+ platform/generator-dependent behavior (e.g., build_type subfolders
63+ on single-config generators).
64+ """
65+ self.folders.build = "."
66+ self.folders.generators = "generators"
5767
5868 def requirements(self):
5969 """CPPython managed requirements."""
@@ -74,7 +84,7 @@ def _create_conanfile(
7484 """Creates a conanfile.py file that inherits from CPPython base."""
7585 class_name = name .replace ('-' , '_' ).title ().replace ('_' , '' )
7686 content = f'''import os
77- from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
87+ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain
7888from conan.tools.files import copy
7989
8090from conanfile_base import CPPythonBase
@@ -107,7 +117,12 @@ def build_requirements(self):
107117 # Add your custom build requirements here
108118
109119 def layout(self):
110- cmake_layout(self)
120+ """Configure build folder layout.
121+
122+ CPPython managed layout is inherited from CPPythonBase.
123+ Override if you need custom folder settings.
124+ """
125+ super().layout() # Get CPPython managed layout
111126
112127 def generate(self):
113128 deps = CMakeDeps(self)
0 commit comments