-
Notifications
You must be signed in to change notification settings - Fork 20
/
conanfile.py
36 lines (30 loc) · 1.36 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
from conans import ConanFile, CMake
class GrpccbConan(ConanFile):
name = "grpc_cb"
version = "0.2"
license = "Apache-2.0"
url = "https://github.com/jinq0123/grpc_cb"
description = "C++ gRPC library with callback interface."
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = "shared=False"
# conan remote add jinq0123 https://api.bintray.com/conan/jinq0123/test
# before install, or create from:
# https://github.com/jinq0123/conan-grpc
requires = "grpc_cb_core/0.2@jinq0123/testing",
generators = "cmake", "Premake" # A custom generator: PremakeGen/0.1@memsharded/testing
build_requires = "PremakeGen/0.1@memsharded/testing"
exports_sources = "src*", "include*", "CMakeLists.txt"
def build(self):
cmake = CMake(self)
self.run('cmake %s %s' % (self.source_folder, cmake.command_line))
self.run("cmake --build . %s" % cmake.build_config)
def package(self):
self.copy("include/*")
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 = ["grpc_cb"]