Skip to content

Commit f3675b0

Browse files
committed
Add ESP-IDF component support
- Add idf_component.yml for ESP Component Registry - Add ESP_PLATFORM detection in CMakeLists.txt
1 parent f9f0931 commit f3675b0

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
cmake_minimum_required(VERSION 3.14)
22

33
project(frequency
4-
VERSION 1.0.0
4+
VERSION 1.1.0
55
DESCRIPTION "Type-safe frequency handling library modeled after std::chrono"
66
HOMEPAGE_URL "https://github.com/cleishm/frequency-cpp"
77
LANGUAGES CXX
88
)
99

10+
# ESP-IDF component support
11+
if(ESP_PLATFORM)
12+
idf_component_register(INCLUDE_DIRS "include")
13+
return()
14+
endif()
15+
1016
option(FREQUENCY_BUILD_TESTS "Build tests" ${frequency_IS_TOP_LEVEL})
1117

1218
set(CMAKE_CXX_EXTENSIONS OFF)

idf_component.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: "1.1.0"
2+
description: "Type-safe frequency handling library modeled after std::chrono"
3+
url: "https://github.com/cleishm/frequency-cpp"
4+
repository: "https://github.com/cleishm/frequency-cpp.git"
5+
license: "MIT"
6+
targets:
7+
- esp32
8+
- esp32s2
9+
- esp32s3
10+
- esp32c3
11+
- esp32c6
12+
- esp32h2

0 commit comments

Comments
 (0)