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 = "" author = " " url = "" description = "" topics = ("", "", "") # 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"]