mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-04 03:52:01 +02:00
components: use new component registration api
This commit is contained in:
@@ -1,22 +1,20 @@
|
||||
set(COMPONENT_SRCS "unity/src/unity.c"
|
||||
"unity_port_esp32.c")
|
||||
|
||||
set(COMPONENT_ADD_INCLUDEDIRS "include"
|
||||
"unity/src")
|
||||
set(srcs "unity/src/unity.c"
|
||||
"unity_port_esp32.c")
|
||||
|
||||
if(CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL)
|
||||
list(APPEND COMPONENT_PRIV_INCLUDEDIRS "include/priv")
|
||||
endif()
|
||||
|
||||
if(CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER)
|
||||
list(APPEND COMPONENT_SRCS "unity_runner.c")
|
||||
list(APPEND srcs "unity_runner.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_UNITY_ENABLE_FIXTURE)
|
||||
list(APPEND COMPONENT_SRCS "unity/extras/fixture/src/unity_fixture.c")
|
||||
list(APPEND srcs "unity/extras/fixture/src/unity_fixture.c")
|
||||
endif()
|
||||
|
||||
register_component()
|
||||
idf_component_register(SRCS "${srcs}"
|
||||
INCLUDE_DIRS "include" "unity/src")
|
||||
|
||||
target_compile_definitions(${COMPONENT_LIB} PUBLIC
|
||||
-DUNITY_INCLUDE_CONFIG_H
|
||||
|
||||
Reference in New Issue
Block a user