Skip to content

Commit 84b2437

Browse files
author
Руслан Ус
committed
chore: switch to eil-cmake-utils
1 parent ac43a69 commit 84b2437

File tree

5 files changed

+20
-36
lines changed

5 files changed

+20
-36
lines changed

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "common"]
2-
path = common
3-
url = https://github.com/esp-idf-lib/common.git
1+
[submodule "eil-cmake-utils"]
2+
path = eil-cmake-utils
3+
url = git@github.com:esp-idf-lib/eil-cmake-utils.git

CMakeLists.txt

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
if(${IDF_TARGET} STREQUAL esp8266)
2-
set(req esp8266 freertos log esp_idf_lib_helpers)
3-
elseif(${IDF_VERSION_MAJOR} STREQUAL 5 AND ${IDF_VERSION_MINOR} LESS 3)
4-
set(req driver freertos log esp_idf_lib_helpers)
1+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/eil-cmake-utils/cmake)
2+
include(eil_check_idf_features)
3+
eil_check_idf_has_esp_drivers()
4+
5+
# List of common ESP-IDF components required by this component
6+
set(REQUIRED_COMPONENTS freertos esp_idf_lib_helpers)
7+
8+
if(EIL_IDF_HAS_ESP_DRIVERS)
9+
list(APPEND REQUIRED_COMPONENTS esp_driver_gpio)
510
else()
6-
set(req esp_driver_gpio freertos log esp_idf_lib_helpers)
11+
list(APPEND REQUIRED_COMPONENTS driver)
12+
endif()
13+
14+
if(${IDF_TARGET} STREQUAL esp8266)
15+
set(REQUIRED_COMPONENTS esp8266 freertos esp_idf_lib_helpers)
716
endif()
817

918
idf_component_register(
1019
SRCS dht.c
1120
INCLUDE_DIRS .
12-
REQUIRES ${req}
21+
REQUIRES ${REQUIRED_COMPONENTS}
1322
)
1423

15-
# include common cmake file for components
16-
set(ESP_IDF_LIB_CMAKE ${CMAKE_CURRENT_LIST_DIR}/common/cmake/esp-idf-lib.cmake)
17-
if(EXISTS ${ESP_IDF_LIB_CMAKE})
18-
include(${ESP_IDF_LIB_CMAKE})
19-
else()
20-
message(WARNING "${ESP_IDF_LIB_CMAKE} not found")
21-
endif()
24+
include(eil_ci)

Kconfig.i2c

Lines changed: 0 additions & 19 deletions
This file was deleted.

common

Lines changed: 0 additions & 1 deletion
This file was deleted.

eil-cmake-utils

Submodule eil-cmake-utils added at c91055e

0 commit comments

Comments
 (0)