Skip to content

Commit 17fc226

Browse files
committed
cmake: Declare nvs_flash as a dependency, instead of pushing absolute include path
For more information about how component requirements are declared, see https://docs.espressif.com/projects/esp-idf/en/v4.0.1/api-guides/build-system.html#component-requirements Closes loboris#8
1 parent a06a578 commit 17fc226

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

main/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
set(SOURCES tft_demo.c)
22
idf_component_register(
33
SRCS ${SOURCES}
4-
INCLUDE_DIRS
5-
${CMAKE_CURRENT_LIST_DIR}
6-
$ENV{IDF_PATH}/components
74
REQUIRES
85
tft
96
spiffs
7+
PRIV_REQUIRES
8+
nvs_flash
109
)

main/tft_demo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "freertos/event_groups.h"
2525
#include "esp_sntp.h"
2626
#include "esp_log.h"
27-
#include "nvs_flash/include/nvs_flash.h"
27+
#include "nvs_flash.h"
2828

2929
#endif
3030

0 commit comments

Comments
 (0)