-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconanfile.py
90 lines (79 loc) · 3.89 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# -------------------------------------------------------------------------------
# nesci -- neuronal simulator conan interface
#
# Copyright (c) 2018 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualization Group.
# -------------------------------------------------------------------------------
# License
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------------
from conans import ConanFile, CMake
class nesci(ConanFile):
name = "nesci"
version = "18.07"
license = "Apache License, Version 2.0"
description = """nesci -- neural simulator conan interface"""
settings = "os", "compiler", "build_type", "arch"
exports_sources = "*"
url = "https://devhub.vr.rwth-aachen.de/VR-Group/nesci"
requires = (("catch/1.12.0@RWTH-VR/thirdparty"),
("cpplint/e8ffd7c@RWTH-VR/thirdparty"),
("cppcheck/1.84@RWTH-VR/thirdparty"),
("conduit/0.3.1@RWTH-VR/thirdparty"),
("boost_python/1.66.0@bincrafters/testing"))
generators = "cmake"
def configure(self):
self.options["boost"].header_only = False
self.options["boost"].shared = True
self.options["boost_python"].python_version = 2.7
if (self.settings.os == "Windows"):
self.options["boost_python"].shared = False
else:
self.options["boost_python"].shared = True
self.options["conduit"].shared = False
def imports(self):
self.copy("*.dll", dst="consumer/tests/Debug", src="bin")
self.copy("*.dll", dst="consumer/tests/Release", src="bin")
self.copy("*.dll", dst="consumer/tests", src="bin")
self.copy("*.so", dst="consumer/tests", src="lib")
self.copy("*.dylib", dst="consumer/tests", src="lib")
self.copy("*.dll", dst="layout/tests/Debug", src="bin")
self.copy("*.dll", dst="layout/tests/Release", src="bin")
self.copy("*.dll", dst="layout/tests", src="bin")
self.copy("*.so", dst="layout/tests", src="lib")
self.copy("*.dylib", dst="layout/tests", src="lib")
self.copy("*.dll", dst="producer/tests/Debug", src="bin")
self.copy("*.dll", dst="producer/tests/Release", src="bin")
self.copy("*.dll", dst="producer/tests", src="bin")
self.copy("*.so", dst="producer/tests", src="lib")
self.copy("*.dylib", dst="producer/tests", src="lib")
def build(self):
cmake = CMake(self)
cmake.configure(source_folder='.')
cmake.build()
def package(self):
self.copy("*.hpp", dst="include", src="layout/include")
self.copy("*.hpp", dst="include", src="producer/include")
self.copy("*.hpp", dst="include", src="consumer/include")
self.copy("*.hpp", dst="include", src="build/layout/include")
self.copy("*.hpp", dst="include", src="build/producer/include")
self.copy("*.hpp", dst="include", src="build/consumer/include")
self.copy("*.lib", dst="lib", keep_path=False)
self.copy("*.dll", dst="bin", keep_path=False)
self.copy("*.so*", dst="lib", keep_path=False)
self.copy("*.a", dst="lib", keep_path=False)
self.copy("*.dylib", dst="lib", keep_path=False, symlinks=True)
def package_info(self):
self.cpp_info.libs = ["nesci_consumer",
"nesci_producer", "nesci_layout"]