Skip to content

Commit

Permalink
samples: Fix absolute path in target_sources()
Browse files Browse the repository at this point in the history
Use
target_sources(app PRIVATE ${ZEPHYR_BASE}/[path to sources])
instead of
target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/[path to sources])

Signed-off-by: Sebastian Głąb <[email protected]>
  • Loading branch information
nordic-segl committed Feb 27, 2025
1 parent 344abd4 commit 8fc22cd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion samples/drivers/audio/dmic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(dmic)

target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/drivers/audio/dmic/src/main.c)
target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/drivers/audio/dmic/src/main.c)
2 changes: 1 addition & 1 deletion samples/sensor/qdec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(qdec_sensor)

target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/sensor/qdec/src/main.c)
target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/sensor/qdec/src/main.c)
2 changes: 1 addition & 1 deletion samples/subsys/settings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(settings_sample)

target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/subsys/settings/src/main.c)
target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/subsys/settings/src/main.c)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(KCONFIG_ROOT $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/Kconfig)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(system_off)

target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/src/main.c)
target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/boards/nordic/system_off/src/main.c)
if(CONFIG_APP_USE_NRF_RETENTION OR CONFIG_APP_USE_RETAINED_MEM)
target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/boards/nordic/system_off/src/retained.c)
target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/boards/nordic/system_off/src/retained.c)
endif()

0 comments on commit 8fc22cd

Please sign in to comment.