-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconanfile.py
39 lines (31 loc) · 1.67 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
import os
from conans import ConanFile, tools
class NpmMasMas(ConanFile):
name = "design-patterns-cpp14"
version = "1.0.24"
license = "Attribution 4.0 International"
url = "https://github.com/makiolo/design-patterns-cpp14"
description = "This fast event system allows calls between two interfaces decoupled (sync or async)"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = {"shared": True}
generators = "cmake"
def configure(self):
self.options["boost"].shared = True
def requirements(self):
self.requires('boost/1.70.0@conan/stable')
self.requires('gtest/1.8.1@bincrafters/stable')
def source(self):
self.run("git clone {}".format(self.url))
def build(self):
self.run("cd {} && npm install && npm test".format(self.name))
def package(self):
self.copy("{}/include/*.h".format(self.name), dst=os.path.join('include', self.name), keep_path=False)
self.copy("{}/bin/{}/*.lib".format(self.name, self.settings.build_type), dst="lib", keep_path=False)
self.copy("{}/bin/{}/*.dll".format(self.name, self.settings.build_type), dst="bin", keep_path=False)
self.copy("{}/bin/{}/*.so".format(self.name, self.settings.build_type), dst="lib", keep_path=False)
self.copy("{}/bin/{}/*.dylib".format(self.name, self.settings.build_type), dst="lib", keep_path=False)
self.copy("{}/bin/{}/*.a".format(self.name, self.settings.build_type), dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = [lib for lib in tools.collect_libs(self)]
self.cpp_info.includedirs.append('include')