-
Notifications
You must be signed in to change notification settings - Fork 34
/
conanfile.py
70 lines (61 loc) · 2.16 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import os # noqa: D100
from conans import CMake, ConanFile
class simCenterBackendApps(ConanFile): # noqa: D101
name = 'SimCenterBackendApplications'
version = '1.2.2'
description = 'Backend applications for SimCenter software'
license = 'BSD 3-Clause'
author = 'Michael Gardner [email protected]'
url = 'https://github.com/NHERI-SimCenter/SimCenterBackendApplications'
settings = { # noqa: RUF012
'os': None,
'build_type': None,
'compiler': None,
'arch': ['x86_64', 'armv8'],
}
options = {'shared': [True, False]} # noqa: RUF012
default_options = { # noqa: RUF012
'libcurl:with_ssl': 'openssl',
'boost:without_fiber': True,
}
generators = 'cmake'
build_policy = 'missing'
requires = [ # noqa: RUF012
'jansson/2.13.1',
'zlib/1.2.11',
'libcurl/8.1.1',
'eigen/3.3.7',
'clara/1.1.5',
'jsonformoderncpp/3.7.0',
'nanoflann/1.3.2',
'nlopt/2.7.1',
'boost/1.71.0',
'kissfft/131.1.0',
]
# Custom attributes for Bincrafters recipe conventions
_source_subfolder = 'source_subfolder'
_build_subfolder = 'build_subfolder'
# Set short paths for Windows
short_paths = True
scm = { # noqa: RUF012
'type': 'git', # Use "type": "svn", if local repo is managed using SVN
'subfolder': _source_subfolder,
'url': 'auto',
'revision': 'auto',
}
def configure(self): # noqa: D102
self.options.shared = False
def configure_cmake(self): # noqa: D102
cmake = CMake(self)
cmake.configure(source_folder=self._source_subfolder)
return cmake
def build(self): # noqa: D102
cmake = self.configure_cmake()
cmake.build()
def package(self): # noqa: D102
self.copy(pattern='LICENSE', dst='licenses', src=self._source_subfolder)
cmake = self.configure_cmake()
cmake.install()
self.copy('*', dst='bin', src=self._source_subfolder + '/applications')
def package_info(self): # noqa: D102
self.env_info.PATH.append(os.path.join(self.package_folder, 'bin')) # noqa: PTH118