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