123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- from conan import ConanFile
- from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
- class tsdbRecipe(ConanFile):
- name = "tsdb"
- version = "0.1.0"
- package_type = "library"
- # Optional metadata
- license = "<Put the package license here>"
- author = "<Put your name here> <And your email here>"
- url = "<Package recipe repository url here, for issues about the package>"
- description = "<Description of tsdb package here>"
- topics = ("<Put some tag here>", "<here>", "<and here>")
- # Binary configuration
- settings = "os", "compiler", "build_type", "arch"
- options = {"shared": [True, False], "fPIC": [True, False]}
- default_options = {"shared": False, "fPIC": True}
- # Sources are located in the same place as this recipe, copy them to the recipe
- exports_sources = "CMakeLists.txt", "src/*", "include/*"
- # generators = "CMakeDeps", "CMakeToolchain"
- def requirements(self):
- # self.requires("clickhouse-cpp/2.5.1")
- self.requires("clickhouse-cpp/2.5.1_patch1@apkipa")
- self.requires("spdlog/1.14.1")
- self.requires("yaml-cpp/0.8.0")
- self.requires("nlohmann_json/3.11.3")
- self.requires("fmt/10.2.1")
- self.requires("zstd/1.5.6")
- def config_options(self):
- if self.settings.os == "Windows":
- self.options.rm_safe("fPIC")
- def configure(self):
- if self.options.shared:
- self.options.rm_safe("fPIC")
- def layout(self):
- cmake_layout(self)
-
- def generate(self):
- deps = CMakeDeps(self)
- deps.generate()
- tc = CMakeToolchain(self)
- tc.generate()
- def build(self):
- cmake = CMake(self)
- cmake.configure()
- cmake.build()
- def package(self):
- cmake = CMake(self)
- cmake.install()
- def package_info(self):
- self.cpp_info.libs = ["tsdb"]
|