-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
44 lines (33 loc) · 1.71 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
# /**************************************************************
# * @Copyright: 2021-2022 Copyright SAIC
# * @Author: lijinwen
# * @Date: 2022-10-26 09:42:14
# * @Last Modified by: lijinwen
# * @Last Modified time: 2022-10-26 09:42:14
# **************************************************************/
from conans import ConanFile, CMake, tools
codePath = "/root/code/xop"
class TensorrtinferConan(ConanFile):
name = "xop"
version = "1.0.0-alpha.1"
license = "<Put the package license here>"
author = "[email protected]"
url = "http://10.94.119.155/algorithm_optimization/xop.git"
topics = ("json", "conan")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
generators = "cmake"
exports_sources = "CMakeLists.txt"
def build(self):
self.run('./scripts/build_project.sh %s'%(self.settings.arch), cwd=codePath)
def package(self):
# xop
self.copy("*.so*", dst="lib/%s"%(self.settings.arch), src="%s/Release/lib/"%(codePath), keep_path=False, symlinks=True)
self.copy("*.so*", dst="%s/targetfs/lib/%s"%(codePath, self.settings.arch),src="%s/Release/lib/"%(codePath), keep_path=False, symlinks=True)
# # xop test
self.copy("*", dst="%s/targetfs/test/"%(codePath), src="%s/src/test"%(codePath))
self.copy("*.so*", dst="%s/targetfs/test/lib/"%(codePath),src="%s/third_party/onnxruntime-linux-x64-1.8.1/lib"%(codePath), keep_path=False, symlinks=True)
# self.copy("*.*", dst="%s/targetfs/test/data"%(codePath), src="%s/data/"%(codePath))
def package_info(self):
self.cpp_info.libs = [self.name]