From b57c4467c2003fbe9b2087e7269dbf4373b56d90 Mon Sep 17 00:00:00 2001 From: Alex Trotta <44127594+Ahajha@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:53:59 -0500 Subject: [PATCH] mpdecimal: Fix lib name on MSVC/shared, fix Mac cross-builds (#25889) --- recipes/mpdecimal/2.5.x/conanfile.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index ce8610550b172..eb2f694bc66f9 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.gnu import AutotoolsToolchain, AutotoolsDeps, Autotools +from conan.tools.gnu import AutotoolsToolchain, Autotools from conan.tools.files import get, chdir, copy, export_conandata_patches, apply_conandata_patches, mkdir, rename from conan.tools.layout import basic_layout from conan.tools.build import cross_building @@ -102,13 +102,9 @@ def generate(self): tc = AutotoolsToolchain(self) tc.configure_args.append("--enable-cxx" if self.options.cxx else "--disable-cxx") - tc.generate() - - deps = AutotoolsDeps(self) - if is_apple_os(self) and self.settings.arch == "armv8": - deps.environment.append("LDFLAGS", ["-arch arm64"]) - deps.environment.append("LDXXFLAGS", ["-arch arm64"]) - deps.generate() + tc_env = tc.environment() + tc_env.append("LDXXFLAGS", ["$LDFLAGS"]) + tc.generate(tc_env) @property def _dist_folder(self): @@ -219,7 +215,10 @@ def package(self): def package_info(self): lib_pre_suf = ("", "") if is_msvc(self): - lib_pre_suf = ("lib", f"-{self.version}") + if self.options.shared: + lib_pre_suf = ("lib", f"-{self.version}.dll") + else: + lib_pre_suf = ("lib", f"-{self.version}") elif self.settings.os == "Windows": if self.options.shared: lib_pre_suf = ("", ".dll")