From 5b83f2848a37a2119deaf6fd7b75f801e01146af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD?= Date: Tue, 1 Jul 2025 09:53:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=B5-=D0=BA=D0=B0=D0=BA=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B0?= =?UTF-8?q?=20Conan'a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + conanfile.py | 2 +- custom_recipes/zstd_fix/conanfile.py | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 custom_recipes/zstd_fix/conanfile.py diff --git a/README.md b/README.md index 157880f..5c3d4ae 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ conan export custom_recipes/boost/ --user=up_and_down --channel=stable conan export custom_recipes/openssl_fix/ --user=up_and_down --channel=stable conan export custom_recipes/lz4_fix/ --user=up_and_down --channel=stable conan export custom_recipes/zlib_fix/ --user=up_and_down --channel=stable +conan export custom_recipes/zstd_fix/ --user=up_and_down --channel=stable // Запуск дебага conan install . -pr ./profiles/debug_profile --output-folder=cmake-build-debug --build=missing diff --git a/conanfile.py b/conanfile.py index 56c69a4..b249585 100644 --- a/conanfile.py +++ b/conanfile.py @@ -11,9 +11,9 @@ class UpAndDown(ConanFile): self.requires("boost/1.87.0@up_and_down/stable") self.requires("libmysqlclient/8.1.0") self.requires("lz4/1.10.0@up_and_down/stable", override=True) - self.requires("zstd/1.5.7", override=True) self.requires("openssl/3.5.0@up_and_down/stable", force=True) self.requires("zlib/1.3.1@up_and_down/stable", override=True) + self.requires("zstd/1.5.7@up_and_down/stable", override=True) def configure(self): # Настройки для boost diff --git a/custom_recipes/zstd_fix/conanfile.py b/custom_recipes/zstd_fix/conanfile.py new file mode 100644 index 0000000..58acf61 --- /dev/null +++ b/custom_recipes/zstd_fix/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.files import get, copy +import os + +class ZstdConan(ConanFile): + name = "zstd" + version = "1.5.7" + settings = "os", "compiler", "build_type", "arch" + + def source(self): + get(self, + url=f"https://github.com/facebook/zstd/releases/download/v{self.version}/zstd-{self.version}.tar.gz", + sha256="eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3", + strip_root=True) + + def build(self): + pass # Используем предсобранные библиотеки + + def package(self): + # Копируем предсобранные библиотеки из архива + copy(self, "*.h", src=os.path.join(self.source_folder, "lib"), dst=os.path.join(self.package_folder, "include")) + copy(self, "*.lib", src=os.path.join(self.source_folder, "lib"), dst=os.path.join(self.package_folder, "lib")) + copy(self, "*.dll", src=os.path.join(self.source_folder, "lib"), dst=os.path.join(self.package_folder, "bin")) + copy(self, "*.a", src=os.path.join(self.source_folder, "lib"), dst=os.path.join(self.package_folder, "lib")) + + def package_info(self): + self.cpp_info.libs = ["zstd"] \ No newline at end of file