mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
21 lines
640 B
CMake
21 lines
640 B
CMake
set(lib_dir ${build_dir}/esp-idf)
|
|
|
|
set(driver i2s.c i2s_hal.c spi_bus_lock.c)
|
|
string(REPLACE ".c" ".c.obj" driver_obj "${driver}")
|
|
|
|
idf_component_register( SRCS ${driver}
|
|
REQUIRES driver
|
|
INCLUDE_DIRS ${IDF_PATH}/components/driver
|
|
PRIV_INCLUDE_DIRS ${IDF_PATH}/components/driver/include/driver
|
|
)
|
|
|
|
# CMake is just a pile of crap
|
|
message("!! overriding ${driver} !!")
|
|
message("CAREFUL, LIBRARIES STRIPPING FROM DUPLICATED COMPONENTS DEPENDS ON THIS BEING REBUILD")
|
|
|
|
add_custom_command(
|
|
TARGET ${COMPONENT_LIB}
|
|
PRE_LINK
|
|
COMMAND xtensa-esp32-elf-ar -d ${lib_dir}/driver/libdriver.a ${driver_obj}
|
|
VERBATIM
|
|
) |