From 738ba641013f0a244232a48871a109a40cbda6f8 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 18 Jul 2024 15:06:52 +1000 Subject: [PATCH] build: add a conanfile for dependencies --- conanfile.py | 52 --------------------------------------------------- conanfile.txt | 3 +++ 2 files changed, 3 insertions(+), 52 deletions(-) delete mode 100644 conanfile.py create mode 100644 conanfile.txt diff --git a/conanfile.py b/conanfile.py deleted file mode 100644 index bfb97d52..00000000 --- a/conanfile.py +++ /dev/null @@ -1,52 +0,0 @@ -import os.path - -from conan import ConanFile -from conan.tools.cmake import cmake_layout, CMake - - -class MyConan(ConanFile): - name = 'cruft-util' - version = '0.1' - user = 'nerdcruft' - - settings = "os", "compiler", "build_type", "arch" - - build_requires = ( - 'nc/0.1@nerdcruft', - ) - - requires = ( - 'fmt/[~10]', - 'range-v3/[~0.11]', - ) - - generators = "CMakeToolchain", "CMakeDeps" - - exports_sources = 'CMakeLists.txt', 'src*', 'test*', 'Doxyfile.in', 'preprocessor.py', 'libcruft.pc.in', - - def layout(self): - cmake_layout(self) - return - - self.folders.source = '.' - self.folders.build = os.path.join('build', 'debug', 'gcc') - self.folders.generators = os.path.join(self.folders.build, 'generators') - - self.cpp.source.includedirs = ['.'] - self.cpp.build.includedirs = [ - os.path.join('generated') - ] - - self.cpp.package.libs = ['cruft'] - - def build(self): - cmake = CMake(self) - cmake.configure(cli_args=['-G=Ninja']) - cmake.build() - - def package(self): - cmake = CMake(self) - cmake.install() - - def package_info(self): - self.cpp_info.libs = ['cruft'] \ No newline at end of file diff --git a/conanfile.txt b/conanfile.txt new file mode 100644 index 00000000..7fe23b48 --- /dev/null +++ b/conanfile.txt @@ -0,0 +1,3 @@ +[requires] +fmt/10.1.1 +range-v3/0.11.0