-
Notifications
You must be signed in to change notification settings - Fork 11
/
conanfile.py
36 lines (31 loc) · 1.35 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
from conans import ConanFile, CMake, tools
import os
class FastberConan(ConanFile):
name = "fast_ber"
version = "0.4"
license = "Boost Software License 1.0"
author = "Samuel Tyler"
url = "https://github.com/Samuel-Tyler/fast_ber"
description = "A performant ASN.1 BER encoding and decoding library written in C++11"
topics = "ASN", "ASN1", "ASN.1", "BER", "Serialization"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = {"shared": False}
generators = "cmake", "cmake_find_package_multi"
requires = "abseil/20200205"
scm = {"type": "git", "url": url, "revision": "master", "subfolder": name}
def build(self):
cmake = CMake(self)
cmake.definitions["SKIP_TESTING"] = True
cmake.definitions["SKIP_AUTO_GENERATION"] = True
cmake.configure(source_folder=self.name)
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)
self.cpp_info.names["cmake_find_package"] = "fast_ber_lib"
self.cpp_info.names["cmake_find_package_multi"] = "fast_ber_lib"
self.cpp_info.build_modules.append("lib/fast_ber/fast_ber_generate.cmake")
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))