generated from cpp-best-practices/gui_starter_template
-
Notifications
You must be signed in to change notification settings - Fork 8
/
conanfile.py
56 lines (49 loc) · 1.79 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Conan recipe package for opencmw-cpp
"""
from conans import ConanFile, CMake, tools
class OpencmwConan(ConanFile):
"""Conan recipe package for opencmw-cpp
"""
name = "opencmw"
version = "0.0.1"
license = "LGPL-3.0"
url = "https://github.com/fair-acc/opencmw-cpp"
homepage = "https://github.com/fair-acc/opencmw-cpp"
author = "Alexander Krimm"
topics = (
"conan", "middleware", "serialization", "reflection", "cpp20", "rest-api", "microservice",
"opencmw"
)
description = "Open Common Middle-Ware library for accelerator equipment and beam-based control systems at FAIR."
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = {"shared": False}
generators = "cmake"
exports = "LICENSE"
exports_sources = ["cmake/*", "concepts/*", "src/*", "CMakeLists.txt"]
requires = "catch2/2.13.3", "fmt/7.1.3", "mp-units/0.7.0", "zeromq/4.3.4"
def configure_cmake(self):
"""Create CMake instance and execute configure step
"""
tools.mkdir("build")
cmake = CMake(self)
cmake.definitions["OPENCMW_ENABLE_CONCEPTS"] = False
cmake.definitions["OPENCMW_ENABLE_TESTING"] = False
cmake.configure(build_folder="build")
return cmake
def build(self):
"""Configure, build and install FlatBuffers using CMake.
"""
cmake = self.configure_cmake()
cmake.build()
# cmake.test()
def package(self):
cmake = self.configure_cmake()
cmake.install()
cmake.patch_config_paths()
def package_info(self):
"""Collect built libraries names and solve flatc path.
"""
self.cpp_info.libs = tools.collect_libs(self)