forked from WanderPig/SigSlot
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconanfile.py
More file actions
56 lines (48 loc) · 1.63 KB
/
conanfile.py
File metadata and controls
56 lines (48 loc) · 1.63 KB
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
from conan import ConanFile
from conan.tools.cmake import CMakeDeps, CMakeToolchain, CMake, cmake_layout
from conan.tools.files import copy
class Siglot(ConanFile):
name = "st-sigslot"
license = "MIT"
author = "Dave Cridland <dave@cridland.net>"
url = "https://github.com/dwd/SigSlot"
description = "A simple header-only Signal/Slot C++ library"
topics = ("signal", "slot")
exports_sources = "sigslot/*", "CMakeLists.txt", "test/*"
no_copy_source = True
options = {
"tests": [True, False]
}
default_options = {
"tests": False
}
settings = "os", "compiler", "build_type", "arch"
def configure(self):
if not self.options.get_safe("tests"):
self.settings.clear()
else:
self.options["sentry-native"].backend = "inproc"
def requirements(self):
if self.options.get_safe("tests"):
self.requires("gtest/1.12.1")
self.requires("sentry-native/0.7.15")
def layout(self):
if self.options.tests:
cmake_layout(self)
else:
self.folders.source = '.'
def generate(self):
if self.options.get_safe("tests"):
deps = CMakeDeps(self)
deps.generate()
cmake = CMakeToolchain(self)
cmake.generate()
def build(self):
if self.options.get_safe("tests"):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
copy(self, "*.h", self.source_folder, self.package_folder + '/include')
def package_info(self):
self.cpp_info.includedirs = ["include"]