diff --git a/conanfile.py b/conanfile.py index f028c27..e94c569 100644 --- a/conanfile.py +++ b/conanfile.py @@ -22,22 +22,22 @@ required_conan_version = ">=2.0.14" -def add_demo_requirements(conan_file: ConanFile): - platform = str(conan_file.options.platform) - - if platform.startswith("lpc40"): - conan_file.output.warning("Using lpc40 platform library!!") - conan_file.requires("libhal-lpc40/[^3.0.0]") - conan_file.requires( - f"prebuilt-picolibc/{str(conan_file.settings.compiler.version)}") - conan_file.requires(f"libhal-exceptions/[^0.0.1]") - - elif platform.startswith("stm32f1"): - conan_file.output.warning("Using stm32f1 platform library!!") - conan_file.requires("libhal-stm32f1/[^3.0.0]") - conan_file.requires( - f"prebuilt-picolibc/{str(conan_file.settings.compiler.version)}") - conan_file.requires(f"libhal-exceptions/[^0.0.1]") +def add_demo_requirements(conan_file: ConanFile, is_platform: bool = False): + if not is_platform: + platform = str(conan_file.options.platform) + if platform.startswith("lpc40"): + conan_file.output.warning("Using lpc40 platform library!!") + conan_file.requires("libhal-lpc40/[^3.0.0]") + conan_file.requires(f"libhal-exceptions/[^0.0.1]") + + elif platform.startswith("stm32f1"): + conan_file.output.warning("Using stm32f1 platform library!!") + conan_file.requires("libhal-stm32f1/[^3.0.0]") + conan_file.requires(f"libhal-exceptions/[^0.0.1]") + + if conan_file.settings.os == "baremetal": + compiler_version = str(conan_file.settings.compiler.version) + conan_file.requires("prebuilt-picolibc/" + compiler_version) conan_file.requires("libhal-util/[^4.0.0]") @@ -166,5 +166,5 @@ def test(self): class libhal_bootstrap(ConanFile): name = "libhal-bootstrap" - version = "0.0.1" + version = "0.0.2" package_type = "python-require"