CMakeLists.txt 572 B

12345678910111213141516171819202122232425
  1. # ArduinoJson - https://arduinojson.org
  2. # Copyright © 2014-2022, Benoit BLANCHON
  3. # MIT License
  4. cmake_minimum_required(VERSION 3.15)
  5. if(ESP_PLATFORM)
  6. # Build ArduinoJson as an ESP-IDF component
  7. idf_component_register(INCLUDE_DIRS src)
  8. return()
  9. endif()
  10. project(ArduinoJson VERSION 6.20.1)
  11. if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
  12. include(CTest)
  13. endif()
  14. add_subdirectory(src)
  15. if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
  16. include(extras/CompileOptions.cmake)
  17. add_subdirectory(extras/tests)
  18. add_subdirectory(extras/fuzzing)
  19. endif()