-
Notifications
You must be signed in to change notification settings - Fork 41
/
conanfile.py
32 lines (28 loc) · 1.14 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
from conans import ConanFile, CMake
class LuapbintfConan(ConanFile):
name = "luapbintf"
version = "0.2"
license = "MIT"
url = "https://github.com/jinq0123/LuaPbIntf"
description = "Binding Protobuf 3 to Lua 5.3"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = "shared=True"
generators = "cmake"
exports_sources = "src/*"
requires = ("lua-cpp/5.3.4@jinq0123/testing",
"lua-intf/0.1@jinq0123/testing",
"protobuf/3.11.4")
def build(self):
cmake = CMake(self)
self.run('cmake %s/src %s' % (self.source_folder, cmake.command_line))
self.run("cmake --build . %s" % cmake.build_config)
def package(self):
# self.copy("*.h", dst="include", src="src")
self.copy("*.lib", dst="lib", keep_path=False)
self.copy("*.dll", dst="bin", keep_path=False)
self.copy("*.dylib*", dst="lib", keep_path=False)
self.copy("*.so", dst="lib", keep_path=False)
self.copy("*.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["luapbintf"]