Skip to content

Commit

Permalink
handle codegen option in package_info()
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Jan 25, 2022
1 parent d2fdd2d commit f007883
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions recipes/grpc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,6 @@ def corefoundation():
"requires": ["grpc++", "protobuf::libprotobuf"],
"system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
},
"grpc++_reflection": {
"lib": "grpc++_reflection",
"requires": ["grpc++", "protobuf::libprotobuf"],
"system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
},
"grpcpp_channelz": {
"lib": "grpcpp_channelz",
"requires": ["grpc++", "protobuf::libprotobuf"],
"system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
},
"upb": {
"lib": "upb",
"system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
Expand Down Expand Up @@ -354,6 +344,20 @@ def corefoundation():
},
})

if self.options.codegen:
components.update({
"grpc++_reflection": {
"lib": "grpc++_reflection",
"requires": ["grpc++", "protobuf::libprotobuf"],
"system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
},
"grpcpp_channelz": {
"lib": "grpcpp_channelz",
"requires": ["grpc++", "protobuf::libprotobuf"],
"system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(),
},
})

return components

def package_info(self):
Expand Down

0 comments on commit f007883

Please sign in to comment.