Skip to content

Commit 8c42259

Browse files
committed
set up component to compile with cmake
1 parent 9f2250c commit 8c42259

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if(IDF_VERSION_MAJOR GREATER_EQUAL 4)
2+
idf_component_register(SRC_DIRS src
3+
REQUIRES log driver
4+
INCLUDE_DIRS include)
5+
else()
6+
set(COMPONENT_SRCDIRS src)
7+
set(COMPONENT_ADD_INCLUDEDIRS include)
8+
set(COMPONENT_REQUIRES log driver)
9+
register_component()
10+
endif()

component.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
# Use defaults
1+
COMPONENT_ADD_INCLUDEDIRS = include
2+
COMPONENT_SRCDIRS = src

0 commit comments

Comments
 (0)