This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
50 lines (43 loc) · 1.44 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
from conans import ConanFile, CMake, tools
class Fmi4cppConan(ConanFile):
name = "fmi4cpp"
version = "v0.8.0-ALPHA"
license = "MIT"
author = "Lars Ivar Hatledal [email protected]"
url = "https://github.com/NTNU-IHB/FMI4cpp"
description = "FMI 2.0 implementation written in modern C++"
topics = ("FMI", "co-simulation", "model exchange")
settings = "os", "compiler", "build_type", "arch"
options = {
"shared": [True, False]
}
default_options = (
"shared=True",
"boost:shared=True",
"libzip:shared=True"
)
generators = "cmake"
requires = (
"boost/1.71.0",
"libzip/1.7.3",
)
def source(self):
self.run("git clone https://github.com/NTNU-IHB/FMI4cpp.git")
self.run("cd FMI4cpp && git checkout " + self.version)
def build(self):
cmake = CMake(self)
cmake.configure(source_folder = "FMI4cpp",
defs = {
"FMI4CPP_USING_CONAN": "ON",
"FMI4CPP_BUILD_TESTS": "OFF",
"FMI4CPP_BUILD_EXAMPLES": "OFF",
})
cmake.build()
cmake.install()
def package(self):
self.copy("*.dll", dst="bin", keep_path=False)
self.copy("*.so", dst="lib", keep_path=False)
self.copy("*.dylib", dst="lib", keep_path=False)
self.copy("*.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["fmi4cpp"]