Alexander Afanasyev | c3d2990 | 2018-06-29 18:20:55 -0400 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
| 3 | top = '..' |
| 4 | |
| 5 | def build(bld): |
| 6 | # List all .cpp files (whole example should be in one .cpp) |
| 7 | for example in bld.path.ant_glob(['*.cpp']): |
| 8 | name = example.change_ext('').path_from(bld.path.get_bld()) |
| 9 | bld(features=['cxx', 'cxxprogram'], |
| 10 | target=name, |
| 11 | source=[example] + bld.path.ant_glob(['%s/**/*.cpp' % name]), |
| 12 | use='NDN_CXX libndn-nac', |
| 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 | name = subdir.path_from(bld.path) |
| 19 | bld(features=['cxx', 'cxxprogram'], |
| 20 | target="%s/%s" % (name, name), |
| 21 | source=bld.path.ant_glob(['%s/**/*.cpp' % name]), |
| 22 | use='NDN_CXX libndn-nac', |
| 23 | install_path=None, |
| 24 | includes='%s' % name, |
| 25 | ) |