Skip to content

Commit edd8c6d

Browse files
committed
samples: update cmakelists
Cmakelists now also points to the module.conf which is a common config files that enables all dependancies by default thus reducing burden on the user to enable stuff while building their samples Signed-off-by: Dhruva Gole <[email protected]>
1 parent 08d6989 commit edd8c6d

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

samples/blinky_arduino/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
cmake_minimum_required(VERSION 3.20.0)
44

5+
set(CONF_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/module.conf)
56
set(DTC_OVERLAY_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/variants/${BOARD}/${BOARD}.overlay)
7+
68
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
79
project(blinky)
810

911
target_sources(app PRIVATE src/main.cpp)
1012

11-
zephyr_compile_options(-Wno-unused-variable -Wno-comment)
13+
zephyr_compile_options(-Wno-unused-variable -Wno-comment)

samples/button_press_led/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
cmake_minimum_required(VERSION 3.20.0)
44

5+
set(CONF_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/module.conf)
56
set(DTC_OVERLAY_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/variants/${BOARD}/${BOARD}.overlay)
7+
68
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
79
project(blinky)
810

911
target_sources(app PRIVATE src/main.cpp)
1012

11-
zephyr_compile_options(-Wno-unused-variable -Wno-comment)
13+
zephyr_compile_options(-Wno-unused-variable -Wno-comment)

samples/hello_arduino/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
cmake_minimum_required(VERSION 3.20.0)
44

5+
set(CONF_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/module.conf)
56
set(DTC_OVERLAY_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/variants/${BOARD}/${BOARD}.overlay)
7+
68
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
79
project(hello_world)
810

samples/i2cdemo/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
cmake_minimum_required(VERSION 3.20.0)
44

5+
set(CONF_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/module.conf)
56
set(DTC_OVERLAY_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/variants/${BOARD}/${BOARD}.overlay)
7+
68
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
79
project(blinky)
810

911
target_sources(app PRIVATE src/main.cpp)
10-
zephyr_compile_options(-Wno-unused-variable -Wno-comment)
12+
zephyr_compile_options(-Wno-unused-variable -Wno-comment)

0 commit comments

Comments
 (0)