Skip to content

Commit 15249bb

Browse files
committed
lib_build: include example code in build
1 parent 033706a commit 15249bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build_as_lib.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
variant_name = item[1]
5353
menv.Append(BUILD_FLAGS=[f"-I variants/{variant_name}"])
5454
src_filter.append(f"+<../variants/{variant_name}>")
55+
56+
# INCLUDE EXAMPLE CODE IN BUILD (to provide your own support files without touching the tree)
57+
elif isinstance(item, tuple) and item[0] == "BUILD_EXAMPLE":
58+
example_name = item[1]
59+
src_filter.append(f"+<../examples/{example_name}>")
5560

5661
menv.Replace(SRC_FILTER=src_filter)
5762

0 commit comments

Comments
 (0)