-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconanfile.py
64 lines (55 loc) · 1.95 KB
/
conanfile.py
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
63
64
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
from os import environ
class GigamonkeyConan (ConanFile):
name = "gigamonkey"
version = "v0.0.15"
license = "Open BSV"
author = "Daniel Krawisz"
url = "https://github.com/Gigamonkey-BSV/Gigamonkey"
description = "Bitcoin and Bitcoin protocols, including Boost POW and Stratum"
topics = ("Bitcoin", "Boost POW", "Stratum")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
exports_sources = "CMakeLists.txt", "include/*", "src/*", "test/*"
requires = [
"boost/1.80.0",
"openssl/1.1.1t",
"cryptopp/8.5.0",
"nlohmann_json/3.11.2",
"gmp/6.2.1",
"secp256k1/0.3@proofofwork/stable",
"data/v0.0.27@proofofwork/stable",
"gtest/1.12.1"
]
def set_version (self):
if "CIRCLE_TAG" in environ:
self.version = environ.get ("CIRCLE_TAG")[1:]
if "CURRENT_VERSION" in environ:
self.version = environ['CURRENT_VERSION']
else:
self.version = "v0.0.15"
def config_options (self):
if self.settings.os == "Windows":
del self.options.fPIC
def configure_cmake (self):
cmake = CMake (self)
cmake.configure (variables={"PACKAGE_TESTS":"Off"})
return cmake
def layout (self):
cmake_layout(self)
def generate (self):
deps = CMakeDeps (self)
deps.generate ()
tc = CMakeToolchain (self)
tc.generate ()
def build (self):
cmake = self.configure_cmake ()
cmake.build ()
def package (self):
cmake = CMake (self)
cmake.install ()
def package_info (self):
# self.cpp_info.libdirs = ["lib"] # Default value is 'lib'
self.cpp_info.libs = ["gigamonkey"]