2
0

CMakeLists.txt 1.1 KB

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