This commit is contained in:
valeros
2024-03-27 20:25:34 +02:00
parent 02d004d681
commit b901f2dc77
+3 -6
View File
@@ -665,7 +665,7 @@ def compile_source_files(
):
build_envs = prepare_build_envs(config, default_env, debug_allowed)
objects = []
components_dir = fs.to_unix_path(os.path.join(FRAMEWORK_DIR, "components")).lower()
components_dir = fs.to_unix_path(os.path.join(FRAMEWORK_DIR, "components"))
for source in config.get("sources", []):
if source["path"].endswith(".rule"):
continue
@@ -674,16 +674,13 @@ def compile_source_files(
src_dir = config["paths"]["source"]
if not os.path.isabs(src_dir):
src_dir = os.path.join(project_src_dir, config["paths"]["source"])
src_path = os.path.join(
os.path.dirname(source.get("path")).lower(),
os.path.basename(source.get("path"))
)
src_path = source.get("path")
if not os.path.isabs(src_path):
# For cases when sources are located near CMakeLists.txt
src_path = os.path.join(project_src_dir, src_path)
obj_path = os.path.join("$BUILD_DIR", prepend_dir or "")
if src_path.startswith(components_dir):
if src_path.lower().startswith(components_dir.lower()):
obj_path = os.path.join(
obj_path, os.path.relpath(src_path, components_dir)
)