-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
37 lines (30 loc) · 1.76 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
import os
from conans import ConanFile, tools
class NpmMasMas(ConanFile):
name = "cppunix"
version = "1.0.0"
license = "Attribution 4.0 International"
url = "https://github.com/makiolo/asyncply"
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 requirements(self):
self.requires('teelogging/1.0.1@npm-mas-mas/testing')
self.requires('asyncply/1.0.3@npm-mas-mas/testing')
self.requires('design-patterns-cpp14/1.0.23@npm-mas-mas/testing')
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("{}/*.h".format(self.name), dst="include", excludes=["{}/node_modules".format(self.name), "{}/readerwriterqueue".format(self.name)])
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/{}/*_unittest".format(self.name, self.settings.build_type), dst="unittest", 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)]