From 8f96343cf1e36be62a7b797e03100ee55da0b6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Mon, 27 Jul 2020 14:51:06 +0200 Subject: [PATCH] Add support for Kconfig in src/custom Also fixes data_nodes_custom.cpp inclusion based on Kconfig. --- src/CMakeLists.txt | 4 +++- zephyr/Kconfig | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6e290bc..a79feaf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -25,7 +25,9 @@ target_sources(app PRIVATE add_subdirectory(ext) -target_sources_if_kconfig(CONFIG_CUSTOM_DATA_NODES_FILE, app PRIVATE data_nodes_custom.cpp) +if(${CONFIG_CUSTOM_DATA_NODES_FILE}) + target_sources(app PRIVATE data_nodes_custom.cpp) +endif() # Using this option enables user-specific customization of the firmware. The # custom subfolder should have its own CMakeLists.txt file. diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 8031141..fe0935f 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -229,5 +229,8 @@ config CUSTOM_DCDC_CONTROLLER endif +# include custom Kconfig if existing +orsource "../src/custom/Kconfig" + # include main Zephyr menu entries from Zephyr root directory source "Kconfig.zephyr"