aboutsummaryrefslogtreecommitdiff
path: root/conanfile.py
blob: b13f076bc3e000b4bffdbb309393fd396f04edfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import os

from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout


class Wanda(ConanFile):
    name = "wanda"
    version = "1.0.0"
    url = "https://github.com/fmorgner/wanda"
    license = "BSD 3-clause"
    description = "A wallpaper changer for the GNOME"
    scm = {
        "type": "git",
        "url": "auto",
        "revision": "auto",
    }
    generators = (
        "CMakeDeps",
    )
    options = {"shared": [True, False]}
    default_options = {"shared": False}
    settings = (
        "os",
        "arch",
        "compiler",
        "build_type",
    )
    exports_sources = (
        "source/*",
    )
    requires = (
        "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.26]",
    )

    def build(self):
        cmake = CMake(self)
        cmake.configure()
        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="source")

    def package(self):
        cmake = CMake(self)
        cmake.install()

    def package_info(self):
        self.cpp_info.libs = ["wanda"]