Skip to content

Commit 0ae150a

Browse files
tbitcsoz-agent
andcommitted
fix(zephyr): use absolute module paths in CMakeLists
Zephyr includes module CMakeLists from its own build context; relative paths for lib/, include/, and subsys/ failed to resolve. Prefix with CMAKE_CURRENT_LIST_DIR so module files are found consistently. Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 2e8e135 commit 0ae150a

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
if(CONFIG_ARBITER)
44
zephyr_library()
55
zephyr_library_sources(
6-
lib/ARBITER_engine.c
7-
lib/ARBITER_fact_store.c
8-
lib/ARBITER_eval.c
9-
lib/ARBITER_trace.c
6+
${CMAKE_CURRENT_LIST_DIR}/lib/ARBITER_engine.c
7+
${CMAKE_CURRENT_LIST_DIR}/lib/ARBITER_fact_store.c
8+
${CMAKE_CURRENT_LIST_DIR}/lib/ARBITER_eval.c
9+
${CMAKE_CURRENT_LIST_DIR}/lib/ARBITER_trace.c
1010
)
1111

1212
zephyr_library_sources_ifdef(CONFIG_ARBITER_BLOB_LOADER
13-
lib/ARBITER_blob.c
13+
${CMAKE_CURRENT_LIST_DIR}/lib/ARBITER_blob.c
1414
)
1515

1616
zephyr_library_sources_ifdef(CONFIG_ARBITER_ACTION_DISPATCHER
17-
lib/ARBITER_action.c
17+
${CMAKE_CURRENT_LIST_DIR}/lib/ARBITER_action.c
1818
)
1919

20-
zephyr_include_directories(include)
20+
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}/include)
2121

22-
add_subdirectory_ifdef(CONFIG_ARBITER subsys/arbiter)
22+
add_subdirectory_ifdef(CONFIG_ARBITER ${CMAKE_CURRENT_LIST_DIR}/subsys/arbiter)
2323
endif()

LEDGER.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Change Ledger
22

3+
## 2026-05-31T23:44 — Fix Zephyr module CMake source path resolution
4+
- **Author**: Oz
5+
- **Type**: fix
6+
- **REQs affected**: REQ-BUILD-001, REQ-ARCH-016
7+
- **Summary**: Updated root `CMakeLists.txt` to use
8+
`${CMAKE_CURRENT_LIST_DIR}` for all module source, include, and subsystem
9+
paths. This makes the Zephyr module resolve files correctly regardless of
10+
whether it is included from the workspace root, `app/`, or
11+
`modules/lib/arbiter/`.
12+
- **Status**: complete
13+
314
## 2026-05-31T23:39 — Fix Zephyr module CMake guard
415
- **Author**: Oz
516
- **Type**: fix

0 commit comments

Comments
 (0)