CMakeLists.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # get IDF version for comparison
  2. set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")
  3. # set conversion sources
  4. set(COMPONENT_SRCS
  5. conversions/yuv.c
  6. conversions/to_jpg.cpp
  7. conversions/to_bmp.c
  8. conversions/jpge.cpp
  9. conversions/esp_jpg_decode.c
  10. )
  11. set(COMPONENT_PRIV_INCLUDEDIRS
  12. conversions/private_include
  13. )
  14. set(COMPONENT_ADD_INCLUDEDIRS
  15. driver/include
  16. conversions/include
  17. )
  18. set(COMPONENT_REQUIRES driver)
  19. # set driver sources only for supported platforms
  20. if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET STREQUAL "esp32s3")
  21. list(APPEND COMPONENT_SRCS
  22. driver/esp_camera.c
  23. driver/cam_hal.c
  24. driver/sccb.c
  25. driver/sensor.c
  26. sensors/ov2640.c
  27. sensors/ov3660.c
  28. sensors/ov5640.c
  29. sensors/ov7725.c
  30. sensors/ov7670.c
  31. sensors/nt99141.c
  32. sensors/gc0308.c
  33. sensors/gc2145.c
  34. sensors/gc032a.c
  35. sensors/bf3005.c
  36. sensors/bf20a6.c
  37. sensors/sc101iot.c
  38. sensors/sc030iot.c
  39. )
  40. list(APPEND COMPONENT_PRIV_INCLUDEDIRS
  41. driver/private_include
  42. sensors/private_include
  43. target/private_include
  44. )
  45. if(IDF_TARGET STREQUAL "esp32")
  46. list(APPEND COMPONENT_SRCS
  47. target/xclk.c
  48. target/esp32/ll_cam.c
  49. )
  50. endif()
  51. if(IDF_TARGET STREQUAL "esp32s2")
  52. list(APPEND COMPONENT_SRCS
  53. target/xclk.c
  54. target/esp32s2/ll_cam.c
  55. target/esp32s2/tjpgd.c
  56. )
  57. list(APPEND COMPONENT_PRIV_INCLUDEDIRS
  58. target/esp32s2/private_include
  59. )
  60. endif()
  61. if(IDF_TARGET STREQUAL "esp32s3")
  62. list(APPEND COMPONENT_SRCS
  63. target/esp32s3/ll_cam.c
  64. )
  65. endif()
  66. set(COMPONENT_PRIV_REQUIRES freertos nvs_flash)
  67. set(min_version_for_esp_timer "4.2")
  68. if (idf_version VERSION_GREATER_EQUAL min_version_for_esp_timer)
  69. list(APPEND COMPONENT_PRIV_REQUIRES esp_timer)
  70. endif()
  71. endif()
  72. register_component()