diff --git a/recipes/yojimbo/all/conanfile.py b/recipes/yojimbo/all/conanfile.py index b0acc018867348..761855edf7c506 100644 --- a/recipes/yojimbo/all/conanfile.py +++ b/recipes/yojimbo/all/conanfile.py @@ -1,13 +1,14 @@ import os import yaml -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration from conan.tools.env import VirtualBuildEnv from conan.tools.files import chdir, collect_libs, copy, get, replace_in_file, rmdir from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import MSBuild, MSBuildDeps, MSBuildToolchain, is_msvc +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -47,6 +48,17 @@ def requirements(self): self.requires("libsodium/1.0.19") self.requires("mbedtls/2.28.4") # v3+ is not supported + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def validate_build(self): + if self._settings_build.build_type == "Debug": + if conan_version.major == 1: + raise ConanInvalidConfiguration("Premake does not support debug builds with Conan < 2.0") + if self._settings_build.os != "Windows" and self._settings_build.compiler == "gcc" and Version(self._settings_build.compiler.version) < 8: + raise ConanInvalidConfiguration("Debug build requires GCC >= 8 due to util-linux-libuuid") + def build_requirements(self): self.tool_requires("premake/5.0.0-alpha15")