mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 13:07:03 +03:00
cmke .. again
This commit is contained in:
@@ -1,24 +1,22 @@
|
|||||||
set(lib_dir ${build_dir}/esp-idf)
|
|
||||||
|
|
||||||
if(IDF_TARGET STREQUAL esp32)
|
if(IDF_TARGET STREQUAL esp32)
|
||||||
|
set(lib_dir ${build_dir}/esp-idf)
|
||||||
set(driver esp32/i2s.c esp32/i2s_hal.c esp32/spi_bus_lock.c)
|
set(driver esp32/i2s.c esp32/i2s_hal.c esp32/spi_bus_lock.c)
|
||||||
endif()
|
string(REPLACE ".c" ".c.obj" driver_obj "${driver}")
|
||||||
|
|
||||||
string(REPLACE ".c" ".c.obj" driver_obj "${driver}")
|
idf_component_register( SRCS ${driver}
|
||||||
|
|
||||||
idf_component_register( SRCS ${driver}
|
|
||||||
REQUIRES driver
|
REQUIRES driver
|
||||||
INCLUDE_DIRS ${IDF_PATH}/components/driver
|
INCLUDE_DIRS ${IDF_PATH}/components/driver
|
||||||
PRIV_INCLUDE_DIRS ${IDF_PATH}/components/driver/include/driver
|
PRIV_INCLUDE_DIRS ${IDF_PATH}/components/driver/include/driver
|
||||||
)
|
)
|
||||||
|
|
||||||
# CMake is just a pile of crap
|
# CMake is just a pile of crap
|
||||||
message(STATUS "!! overriding ${driver} !!")
|
message(STATUS "!! overriding ${driver} !!")
|
||||||
message(STATUS "CAREFUL, LIBRARIES STRIPPING FROM DUPLICATED COMPONENTS DEPENDS ON THIS BEING REBUILD")
|
message(STATUS "CAREFUL, LIBRARIES STRIPPING FROM DUPLICATED COMPONENTS DEPENDS ON THIS BEING REBUILD")
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${COMPONENT_LIB}
|
TARGET ${COMPONENT_LIB}
|
||||||
PRE_LINK
|
PRE_LINK
|
||||||
COMMAND xtensa-esp32-elf-ar -d ${lib_dir}/driver/libdriver.a ${driver_obj}
|
COMMAND xtensa-esp32-elf-ar -d ${lib_dir}/driver/libdriver.a ${driver_obj}
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user