CMakeLists.txt 919 B

12345678910111213141516171819202122
  1. # this must be set *before* idf_component_register
  2. set(CMAKE_CXX_STANDARD 17)
  3. idf_component_register(
  4. SRC_DIRS .
  5. INCLUDE_DIRS . "cspot/include" "cspot/bell/include"
  6. PRIV_REQUIRES mbedtls mdns nvs_flash platform_config services esp_http_server tools codecs
  7. LDFRAGMENTS "linker.lf"
  8. )
  9. add_definitions(-Wno-unused-variable -Wno-unused-const-variable -Wchar-subscripts -Wunused-label -Wmaybe-uninitialized -Wmisleading-indentation)
  10. set(BELL_DISABLE_CODECS ON)
  11. set(BELL_DISABLE_SINKS ON)
  12. set(CSPOT_TARGET_ESP32 ON)
  13. # becase CMake is so broken, the cache set below overrides a normal "set" for the first build
  14. set(BELL_EXTERNAL_TREMOR "idf::codecs" CACHE STRING "provide own codecs")
  15. set(BELL_EXTERNAL_CJSON "idf::json" CACHE STRING "provide own CJSON")
  16. add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cspot ${CMAKE_CURRENT_BINARY_DIR}/cspot)
  17. target_link_libraries(${COMPONENT_LIB} PRIVATE cspot ${EXTRA_REQ_LIBS})