esp-idf/components/esp_hw_support/CMakeLists.txt

36 lines
1.1 KiB
CMake
Raw Normal View History

idf_build_get_property(target IDF_TARGET)
set(requires soc)
if(${target} STREQUAL "esp32")
list(APPEND requires efuse)
endif()
2021-03-10 08:39:29 -05:00
set(priv_requires efuse)
set(srcs "compare_set.c" "cpu_util.c")
if(NOT BOOTLOADER_BUILD)
2021-03-10 08:39:29 -05:00
list(APPEND srcs "esp_async_memcpy.c"
"esp_clk.c"
"clk_ctrl_os.c"
"hw_random.c"
"intr_alloc.c"
"mac_addr.c"
"sleep_modes.c")
2021-03-10 08:39:29 -05:00
list(APPEND priv_requires esp_ipc)
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/sleep_modes.c" PROPERTIES
COMPILE_FLAGS "-fno-jump-tables -fno-tree-switch-conversion")
endif()
2021-02-18 08:09:27 -05:00
endif()
idf_component_register(SRCS ${srcs}
2021-01-29 01:40:59 -05:00
INCLUDE_DIRS include include/soc
PRIV_INCLUDE_DIRS port/include
REQUIRES ${requires}
2021-03-10 08:39:29 -05:00
PRIV_REQUIRES ${priv_requires}
LDFRAGMENTS linker.lf)
idf_build_get_property(target IDF_TARGET)
add_subdirectory(port/${target})