from conans import ConanFile, CMake

class GrpccbConan(ConanFile):
    name = "grpc_cb"
    version = "0.1"
    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"
    generators = "cmake"
    exports_sources = "src*", "include*"

    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")
        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"]

@@ -369,16 +369,229 @@
 =False%22%0A
+    %0A    # conan remote add jinq0123 https://api.bintray.com/conan/jinq0123/test%0A    # before install, or create from:%0A    # https://github.com/jinq0123/conan-grpc%0A    requires = %22gRPC/1.4.2@jinq0123/stable%22%0A    %0A
     gene

Add requires = "gRPC/1.4.2@jinq0123/stable"