-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconanfile.py
57 lines (51 loc) · 1.54 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
from conans import ConanFile, CMake, tools
class MercuryConan(ConanFile):
name = "Mercury"
version = "1.0"
license = "GPLv2"
url = "https://github.com/KanoComputing/mercury"
description = "A cross-platform base layer for configuring the system"
settings = "os", "compiler", "build_type", "arch"
options = {
"shared": [True, False],
}
default_options = {
"shared": False
}
exports_sources = [
"CMakeLists.txt",
"src/*.cpp",
"src/*.txt",
"include/*.h",
"include/*.in",
"cmake/*",
]
requires = (
"gtest/1.8.1@bincrafters/stable",
"parson/0.1.0@bincrafters/stable",
"Poco/1.9.2@pocoproject/stable",
"yaml-cpp/0.6.2@bincrafters/stable",
)
generators = "cmake"
def build(self):
cmake = CMake(self)
cmake.configure(
source_folder=".",
build_folder=".",
defs={
"BUILD_PYTHON": "OFF",
"BUILD_PYTHON2": "OFF",
}
)
cmake.build()
def package(self):
self.copy("*.h", dst="include", src="include")
self.copy("*mercury.lib", dst="lib", keep_path=False)
self.copy("*.dll", dst="bin", keep_path=False)
if self.options.shared:
self.copy("*.so", dst="lib", keep_path=False)
self.copy("*.dylib", dst="lib", keep_path=False)
else:
self.copy("*.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["mercury"]