-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
executable file
·56 lines (48 loc) · 1.75 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
from conans import ConanFile, tools, CMake
import re, os
def get_version():
try:
content = tools.load("CMakeLists.txt")
version = re.search("VERSION (.*)\s+LANGUAGES", content).group(1)
return version.strip()
except Exception as _:
return None
class ConanPackage(ConanFile):
"""Innovatrics ANSI&ISO accuracy and performance test"""
name = "ansiiso_accuracy_test"
version = get_version()
license = "Apache 2.0"
author = "Tomas Krupa ([email protected])"
url = "https://git.ba.innovatrics.net/users/tomas.krupa/repos/ansi_iso_sdk_accuracy_test.git"
homepage = "https://git.ba.innovatrics.net/users/tomas.krupa/repos/ansi_iso_sdk_accuracy_test.git"
description = "Accuracy and performance benchmark tool for Innovatrics' ANSI&ISO biometric SDK."
settings = "os", "compiler", "build_type", "arch"
generators = "cmake_paths"
short_paths = True
no_copy_source = True
scm = {
"type": "git",
"url": "auto",
"revision": "auto"
}
requires = [
"iengine_ansi_iso/2.4.6@sdk/stable",
]
build_requires = [
"boost/1.71.0@conan/stable",
]
def build_requirements(self):
if not tools.get_env("CONAN_RUN_TESTS", False):
self.build_requires("Catch2/2.7.2@catchorg/stable")
def build(self):
cmakedefs = {}
cmake = CMake(self)
cmake.configure(defs=cmakedefs)
cmake.build(target="clang-format-%s" % self.name)
cmake.build()
cmake.install()
if not tools.get_env("CONAN_RUN_TESTS", False):
cmake.test()
def package_info(self):
self.env_info.PATH.append(os.path.join(self.package_folder, "Bin"))
self.cpp_info.builddirs = [ "." ]