blob: 462fda7054536d3708133bf16f88bb6e167ac724 [file] [log] [blame]
Alexander Afanasyeva1ae0a12014-01-28 15:21:02 -08001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
3top = '..'
4
5def build(bld):
Davide Pesavento19442812018-11-23 14:00:04 -05006 # List all .cpp files (whole example in one .cpp)
7 for ex in bld.path.ant_glob('*.cpp'):
8 name = ex.change_ext('').path_from(bld.path.get_bld())
Davide Pesaventoc9967422023-09-07 22:04:34 -04009 bld.program(name=f'example-{name}',
Davide Pesavento19442812018-11-23 14:00:04 -050010 target=name,
11 source=[ex],
12 use='ndn-cxx',
13 install_path=None)
Alexander Afanasyev28d0d942015-01-04 14:52:19 -080014
Davide Pesavento19442812018-11-23 14:00:04 -050015 # List all directories (example can have multiple .cpp in the directory)
16 for subdir in bld.path.ant_glob('*', dir=True, src=False):
17 name = subdir.path_from(bld.path)
Davide Pesaventoc9967422023-09-07 22:04:34 -040018 bld.program(name=f'example-{name}',
Davide Pesavento19442812018-11-23 14:00:04 -050019 target=name,
20 source=subdir.ant_glob('**/*.cpp'),
21 use='ndn-cxx',
22 includes=name,
23 install_path=None)