aboutsummaryrefslogtreecommitdiff
path: root/conanfile.py
blob: f152f2acaa198eea3c708a8ecc7f6bbcb9a7db72 (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
from conans 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"
    generators = (
        "CMakeDeps",
        "virtualenv",
    )
    settings = (
        "os",
        "arch",
        "compiler",
        "build_type",
    )
    exports_sources = (
        "CMakeLists.txt",
        "src/*",
        "include/*",
        "lib/*",
        "test/*"
    )
    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.24]",
    )

    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"]