generated from Sithas/conan_template
Кое-какая настройка Conan'a
This commit is contained in:
@@ -11,6 +11,7 @@ for %I in ("C:\Program Files\Microsoft Visual Studio\2022\Community") do echo %~
|
||||
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 install . -pr ./profiles/debug_profile --output-folder=cmake-build-debug --build=missing
|
||||
|
||||
+1
-5
@@ -11,10 +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)
|
||||
|
||||
# Явно добавляем новую версию zstd с override
|
||||
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)
|
||||
|
||||
def configure(self):
|
||||
# Настройки для boost
|
||||
@@ -22,6 +21,3 @@ class UpAndDown(ConanFile):
|
||||
self.options["boost/*"].without_stacktrace = True
|
||||
self.options["boost/*"].without_context = True
|
||||
self.options["openssl"].shared = True
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
sources:
|
||||
"1.3.1":
|
||||
url: "https://github.com/madler/zlib/archive/refs/tags/v1.3.1.tar.gz"
|
||||
sha256: "17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c"
|
||||
@@ -0,0 +1,45 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user