waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

wscript (907B)


      1 #!/usr/bin/env python
      2 
      3 
      4 def options(opt):
      5     opt.load('python')
      6     opt.load('compiler_cxx')
      7     opt.load('genpybind')
      8 
      9 
     10 def configure(cfg):
     11     cfg.load('python')
     12     cfg.load('compiler_cxx')
     13     cfg.check_python_version((2, 7))
     14     cfg.check_python_headers()
     15     cfg.load('genpybind')
     16 
     17     cfg.check(compiler='cxx',
     18               features='cxx pyext',
     19               uselib_store='PYBIND11GENPYBIND_EXAMPLE',
     20               mandatory=True,
     21               header_name='pybind11/pybind11.h')
     22 
     23 
     24 def build(bld):
     25     bld(target='example_inc',
     26         export_includes='.')
     27 
     28     bld.shlib(target='example',
     29               source='example.cpp',
     30               features='use',
     31               use='example_inc')
     32 
     33     bld(target='pyexample',
     34         source='example.h',
     35         genpybind_tags='genpybind_example',
     36         features='use genpybind cxx cxxshlib pyext',
     37         use=['PYBIND11GENPYBIND_EXAMPLE', 'example'])