# https://github.com/Infineon/mtb-example-anycloud-wifi-web-server#supported-kits-make-variable-target
psoc6_check_bsp(
  CY8CKIT-062-WIFI-BT
  CY8CPROTO-062-4343W
  CY8CKIT-062S2-43012
  CYW9P62S1-43438EVB-01
  CYW9P62S1-43012EVB-01
)

project(anycloud-wifi-web-server)

psoc6_load_application(
  NAME mtb-example-anycloud-wifi-web-server
  VERSION 1.0.0
)
psoc6_add_executable(
  SOURCES
    ${APP_DIR}/source/main.c
    ${APP_DIR}/source/html_web_page.h
    ${APP_DIR}/source/sensors.h
    ${APP_DIR}/source/sensors.c
    ${APP_DIR}/source/web_server.h
    ${APP_DIR}/source/web_server.c
  LINK_LIBRARIES
    retarget-io
    http-server
    wifi-connection-manager
    capsense
)

# ENABLE_TFT in https://github.com/Infineon/mtb-example-anycloud-wifi-web-server/blob/master/source/sensors.h
if(TARGET CY8CKIT-028-TFT)
  target_link_libraries(${TARGET_NAME} PRIVATE
    emwin-osnts
    display-tft-st7789v-emwin
    CY8CKIT-028-TFT
  )
endif()
