from conan import ConanFile from conan.tools.files import get, replace_in_file import os class ZlibConan(ConanFile): name = "zlib" version = "1.3.1" user = "up_and_down" channel = "stable" settings = "os", "compiler", "build_type", "arch" description = "zlib compression library" license = "Zlib" url = "https://github.com/madler/zlib" # Добавляем экспорт данных exports = "conandata.yml" def source(self): # Получаем данные из conandata.yml data = self.conan_data["sources"][self.version] get(self, **data, strip_root=True) # Удаляем блок IPO для Release cmake_file = os.path.join(self.source_folder, "CMakeLists.txt") replace_in_file( self, cmake_file, "# interprocedural optimizations\n" "if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)\n" " set_target_properties(zlib PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${CMAKE_INTERPROCEDURAL_OPTIMIZATION})\n" "endif()", "", strict=False ) def build(self): # Ваша логика сборки pass def package(self): # Ваша логика упаковки pass def package_info(self): self.cpp_info.libs = ["z"]