-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconanfile.py
More file actions
54 lines (40 loc) · 1.67 KB
/
conanfile.py
File metadata and controls
54 lines (40 loc) · 1.67 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
from conans import ConanFile, CMake, tools
import os
class ProtoconfConan(ConanFile):
name = "protoconf"
version = "0.1.0"
license = "BSD 2-Clause License"
author = "Andrii Zhuk <andrewzhuk@gmail.com>"
url = "<Package recipe repository url here, for issues about the package>"
description = "Protobuf configuration"
topics = ("bsw", "c++", "protobuf", "configuration")
settings = "os", "compiler", "build_type", "arch"
options = {"codecov": [True, False]
, "clangcheck": [True, False]
, "asancheck": [True, False]
, "tsancheck": [True, False]
, "usancheck": [True, False]
, "tags": [True,False]}
default_options = "codecov=False" , "clangcheck=False" , "asancheck=False" , "tsancheck=False" , "usancheck=False", "tags=False"
generators = "cmake"
build_requires = "boost/1.79.0", "gtest/1.11.0", "protobuf/3.21.1"
# TODO
#def source(self):
def build(self):
cmake = CMake(self)
if self.options.codecov == "True":
cmake.definitions["WITH_CODECOV"] = "ON"
if self.options.asancheck == "True":
cmake.definitions["WITH_ASAN"] = "ON"
if self.options.tsancheck == "True":
cmake.definitions["WITH_TSAN"] = "ON"
if self.options.usancheck == "True":
cmake.definitions["WITH_USAN"] = "ON"
if self.options.tags == "True":
cmake.definitions["WITH_TAGS"] = "ON"
cmake.configure(source_folder="src")
cmake.build()
def package(self):
self.copy("*.h", dst="include", src="src/includex")
def package_info(self):
self.cpp_info.libs = ["protoconf"]