forked from open-simulation-platform/proxy-fmu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
40 lines (33 loc) · 967 Bytes
/
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
from conans import ConanFile, CMake, tools
from os import path
class ProxyFmuConan(ConanFile):
name = "proxyfmu"
author = "NTNU Aalesund"
license = "MIT"
exports = "version.txt"
scm = {
"type": "git",
"url": "auto",
"revision": "auto"
}
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package"
requires = (
"cli11/2.2.0",
"thrift/0.17.0",
"fmilibcpp/0.2.2@ais/stable"
)
def set_version(self):
self.version = tools.load(path.join(self.recipe_folder, "version.txt")).strip()
def configure_cmake(self):
cmake = CMake(self)
cmake.configure()
return cmake
def build(self):
cmake = self.configure_cmake()
cmake.build()
def package(self):
cmake = self.configure_cmake()
cmake.install()
def package_info(self):
self.cpp_info.libs = ["proxyfmu-client"]