-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
executable file
·53 lines (45 loc) · 1.67 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake, tools
import os
class InfluxConan(ConanFile):
name = "influxdb-cxx"
version = "0.2.3"
description = "Influxdb client"
topics = ("conan", "influx", "timeseries")
url = "https://github.com/zinnion/conan-influxdb-cxx"
homepage = "https://github.com/zinnion/influxdb-cxx"
author = "Zinnion <[email protected]>"
license = "MIT"
exports = ["LICENSE.md"]
exports_sources = ["CMakeLists.txt"]
settings = "os", "compiler", "build_type", "arch"
short_paths = True
generators = "cmake"
source_subfolder = "source_subfolder"
build_subfolder = "build_subfolder"
options = {
"shared": [True, False]
}
requires = "OpenSSL/1.1.1d@zinnion/stable", "boost/1.71.0@zinnion/stable", "zlib/1.2.11@zinnion/stable"
#requires = "OpenSSL/1.1.1d@zinnion/stable", "zlib/1.2.11@zinnion/stable"
default_options = (
"shared=False"
)
def source(self):
tools.get("{0}/archive/v{1}.tar.gz".format(self.homepage, self.version))
extracted_dir = self.name + "-" + self.version
os.rename(extracted_dir, self.source_subfolder)
def configure_cmake(self):
cmake = CMake(self)
cmake.configure(source_folder=self.source_subfolder, build_folder=self.build_subfolder)
return cmake
def build(self):
cmake = self.configure_cmake()
cmake.build()
def package(self):
self.copy(pattern="LICENSE.txt", dst="license", src=self.source_subfolder)
cmake = self.configure_cmake()
cmake.install()
def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)