Allow putting packages in subdirectories.

This commit is contained in:
Nicolas Van Bossuyt 2022-08-11 13:41:06 +02:00
parent 1f5cddb55f
commit 0bf7d35168

View file

@ -1,5 +1,6 @@
import os
import copy
from pathlib import Path
from . import utils
@ -160,12 +161,18 @@ def cincludes(manifests: dict) -> str:
for key in manifests:
item = manifests[key]
if item["enabled"] and "root-include" in item:
include_paths.append(item["dir"])
if item["enabled"]:
if "root-include" in item:
include_paths.append(item["dir"])
else:
include_paths.append(str(Path(item["dir"]).parent))
if len(include_paths) == 0:
return ""
# remove duplicates
include_paths = utils.stripDups(include_paths)
return " -I" + " -I".join(include_paths)