1
0
Fork 0
forked from lthn/blockchain

Customize build folder layout based on compiler

Updated the layout method to set different build and generator folder paths depending on whether the compiler is MSVC or not. This improves compatibility with multi-configuration generators on MSVC and single-configuration generators on other platforms.
This commit is contained in:
Snider 2025-10-01 18:15:27 +01:00
parent 89c6833845
commit ba3296cec6

View file

@ -39,7 +39,13 @@ class BlockchainConan(ConanFile):
deps.generate()
def layout(self):
cmake_layout(self)
multi = True if self.settings.get_safe("compiler") == "msvc" else False
if multi:
self.folders.generators = os.path.join("build", "generators")
self.folders.build = "build"
else:
self.folders.generators = os.path.join("build", str(self.settings.build_type).lower(), "generators")
self.folders.build = os.path.join("build", str(self.settings.build_type).lower())
def build(self):
cmake = CMake(self)