build: migrate to conan 2 (#585)

Migrates the build system from Conan 1 to Conan 2
This commit is contained in:
Niq Dudfield
2025-10-10 10:57:46 +07:00
committed by GitHub
parent 92e3a927fc
commit fa1b93bfd8
9 changed files with 256 additions and 114 deletions

View File

@@ -38,8 +38,15 @@ class WasmedgeConan(ConanFile):
raise ConanInvalidConfiguration("Binaries for this combination of version/os/arch/compiler are not available")
def package_id(self):
del self.info.settings.compiler.version
self.info.settings.compiler = self._compiler_alias
# Make binary compatible across compiler versions (since we're downloading prebuilt)
self.info.settings.rm_safe("compiler.version")
# Group compilers by their binary compatibility
# Note: We must use self.info.settings here, not self.settings (forbidden in Conan 2)
compiler_name = str(self.info.settings.compiler)
if compiler_name in ["Visual Studio", "msvc"]:
self.info.settings.compiler = "Visual Studio"
else:
self.info.settings.compiler = "gcc"
def build(self):
# This is packaging binaries so the download needs to be in build