[DO-1345] fixed windows packages (!16)

Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/16
Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.team>
Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.team>
This commit is contained in:
aleksandr.vodyanov
2025-02-25 13:53:43 +03:00
committed by Aleksandr Vodyanov
parent 3759e1163f
commit a82e89a1bc
46 changed files with 679 additions and 197 deletions

View File

@@ -46,7 +46,7 @@ class OpenH264Conan(ConanFile):
basic_layout(self, src_folder="src")
def build_requirements(self):
#self.tool_requires("meson/1.4.1")
self.tool_requires("meson/[>=1.4.1<2]")
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/[>=2.2 <3]")
if self.settings.arch in ["x86", "x86_64"]:
@@ -73,6 +73,8 @@ class OpenH264Conan(ConanFile):
if self._preserve_dll_name:
# INFO: When generating with Meson, the library name is openh264-7.dll. This change preserves the old name openh264.dll
replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "soversion: major_version,", "soversion: '',")
if self.settings.compiler == "gcc" and self.settings.os == "Windows":
replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "find_program('nasm", "find_program('nasm.exe")
def build(self):
self._patch_sources()

View File

@@ -21,6 +21,6 @@ class TestPackageConan(ConanFile):
cmake.build()
def test(self):
if can_run(self):
if can_run(self) and (self.settings.os != "Windows" or self.settings.compiler != "gcc"):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")