Ver Fonte

lib_build: exclude file from example

Florent há 11 meses atrás
pai
commit
df18dfb481
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      build_as_lib.py

+ 5 - 0
build_as_lib.py

@@ -58,6 +58,11 @@ for item in menv.get("CPPDEFINES", []):
         example_name = item[1]
         src_filter.append(f"+<../examples/{example_name}>")
 
+    # EXCLUDE A SOURCE FILE FROM AN EXAMPLE (must be placed after example name or boom)
+    elif isinstance(item, tuple) and item[0] == "EXCLUDE_FROM_EXAMPLE":
+        exclude_name = item[1]
+        src_filter.append(f"-<../examples/{example_name}/{exclude_name}>")
+
 menv.Replace(SRC_FILTER=src_filter)
 
 #print (menv.Dump())