Skip to content

Commit

Permalink
yojimbo: fix build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Feb 21, 2024
1 parent bfb8bc5 commit 0d9aae5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion recipes/yojimbo/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 0d9aae5

Please sign in to comment.