Alexander Afanasyev | a1ae0a1 | 2014-01-28 15:21:02 -0800 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
| 3 | top = '..' |
| 4 | |
| 5 | def build(bld): |
Alexander Afanasyev | 28d0d94 | 2015-01-04 14:52:19 -0800 | [diff] [blame^] | 6 | # List all .cpp files (whole example should be in one .cpp) |
| 7 | for i in bld.path.ant_glob(['*.cpp']): |
| 8 | name = str(i)[:-len(".cpp")] |
Alexander Afanasyev | a1ae0a1 | 2014-01-28 15:21:02 -0800 | [diff] [blame] | 9 | bld(features=['cxx', 'cxxprogram'], |
Alexander Afanasyev | 28d0d94 | 2015-01-04 14:52:19 -0800 | [diff] [blame^] | 10 | target=name, |
| 11 | source=[i] + bld.path.ant_glob(['%s/**/*.cpp' % name]), |
| 12 | use='ndn-cxx', |
| 13 | install_path=None |
| 14 | ) |
| 15 | |
| 16 | # List all directories files (example can has multiple .cpp in the directory) |
| 17 | for name in bld.path.ant_glob(['*'], dir=True, src=False): |
| 18 | bld(features=['cxx', 'cxxprogram'], |
| 19 | target="%s/%s" % (name, name), |
| 20 | source=bld.path.ant_glob(['%s/**/*.cpp' % name]), |
| 21 | use='ndn-cxx', |
| 22 | install_path=None, |
| 23 | includes='%s' % name, |
Alexander Afanasyev | 766cea7 | 2014-04-24 19:16:42 -0700 | [diff] [blame] | 24 | ) |