diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2022-09-16 21:33:48 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2022-09-16 21:33:48 +0200 |
| commit | d22bc7b557d36da41fe88d3188a7cd335c3ccaa0 (patch) | |
| tree | 1b350b6bd89291149c9d80389c876604ed257248 /conanfile.py | |
| parent | d70aaf0ef92cac0781dabb60411bbd907e7f0caa (diff) | |
| download | wanda-d22bc7b557d36da41fe88d3188a7cd335c3ccaa0.tar.xz wanda-d22bc7b557d36da41fe88d3188a7cd335c3ccaa0.zip | |
wanda: clean up build
Diffstat (limited to 'conanfile.py')
| -rw-r--r-- | conanfile.py | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/conanfile.py b/conanfile.py index df70efb..4656617 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,6 +1,5 @@ -# pylint: disable=missing-docstring - -from conans import ConanFile, CMake +from conans import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout class Wanda(ConanFile): @@ -9,10 +8,10 @@ class Wanda(ConanFile): url = "https://github.com/fmorgner/wanda" license = "BSD 3-clause" description = "A wallpaper changer for the GNOME" - generators = "cmake" - default_user = "fmorgner" - default_channel = "stable" - build_policy = "missing" + generators = ( + "CMakeDeps", + "virtualenv", + ) settings = ( "os", "arch", @@ -21,30 +20,38 @@ class Wanda(ConanFile): ) exports_sources = ( "CMakeLists.txt", - "cmake/*", "src/*", + "include/*", + "lib/*", + "test/*" ) requires = ( - "asio/1.18.1", - "lyra/1.5.1", - "CUTE/2.2.6@fmorgner/stable", - "spdlog/1.4.2", - "boost/1.75.0", - "libpng/1.6.37", + "asio/[~=1.24.0]", + "boost/[~=1.80.0]", "libjpeg/9d", + "libpng/[~=1.6.0]", + "lyra/[~=1.6.0]", + "spdlog/[~=1.10.0]", + ) + tool_requires = ( + "cmake/[~=3.24]", ) - def configure_cmake(self): + def build(self): cmake = CMake(self) cmake.configure() - return cmake - - def build(self): - cmake = self.configure_cmake() cmake.build() + def generate(self): + toolchain = CMakeToolchain(self) + toolchain.variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = True + toolchain.generate() + + def layout(self): + cmake_layout(self, src_folder=".") + def package(self): - cmake = self.configure_cmake() + cmake = CMake(self) cmake.install() def package_info(self): |
