Use separate CMakeLists.txt per directory

This commit is contained in:
Martin Jäger
2020-07-23 12:41:32 +02:00
parent 8a28d8bc22
commit 3fcd27cdba
3 changed files with 46 additions and 38 deletions
+34
View File
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_include_directories(.)
target_sources(app PRIVATE
bat_charger.cpp
data_nodes.cpp
daq.cpp
daq_driver.c
device_status.cpp
dcdc.cpp
eeprom.cpp
half_bridge.cpp
hardware.cpp
helper.cpp
leds.cpp
load.cpp
load_driver.c
main.cpp
power_port.cpp
pwm_switch_driver.c
pwm_switch.cpp
setup.cpp
)
add_subdirectory(ext)
target_sources_if_kconfig(CONFIG_CUSTOM_DATA_NODES_FILE, app PRIVATE data_nodes_custom.cpp)
# Using this option enables user-specific customization of the firmware. The
# custom subfolder should have its own CMakeLists.txt file.
if(${CONFIG_CUSTOMIZATION})
add_subdirectory(custom build/custom)
endif()
+9
View File
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
target_sources(app PRIVATE
ext.cpp
oled.cpp
serial.cpp
can.cpp
can_msg_queue.cpp
)