mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-29 21:41:44 +01:00
4df813941e
* protoc: extend extra to support also Python language * protoc: fix ext_out, unite c++/python generation, fix protoc_includes name
33 lines
720 B
Python
33 lines
720 B
Python
#! /usr/bin/env python
|
|
|
|
top = '.'
|
|
out = 'build'
|
|
|
|
def options(opt):
|
|
opt.load('compiler_cxx python')
|
|
|
|
def configure(conf):
|
|
conf.load('compiler_cxx python protoc')
|
|
conf.check_python_version(minver=(2, 5, 0))
|
|
|
|
def build(bld):
|
|
bld(
|
|
features = 'cxx cxxshlib',
|
|
source = ['inc/message_inc.proto','inc/message.proto'],
|
|
target = 'somelib',
|
|
includes = ['inc'])
|
|
|
|
|
|
bld(
|
|
features = 'py',
|
|
name = 'pbpy',
|
|
source = ['inc/message_inc.proto','inc/message.proto'],
|
|
protoc_includes = ['inc'])
|
|
|
|
bld(
|
|
features = 'cxx py',
|
|
name = 'pbboth',
|
|
source = ['incboth/messageboth_inc.proto', 'incboth/messageboth.proto'],
|
|
protoc_includes = ['incboth']) # either protoc_includes or includes would work in this case
|
|
|