include(CMakeParseArguments)

# iree_model_input()
#
# CMake function to load an external model input (an image)
# and convert to the iree_c_embed_data.
#
# Parameters:
# NAME: Name of model input image.
# SHAPE: Input shape.
# SRC: Input image URL.
# QUANT: When added, indicate it's a quant model.
#
# Examples:
# iree_model_input(
#   NAME
#     person_detection_quant_input
#   SHAPE
#     "1, 96, 96, 1"
#   SRC
#     "https://github.com/tensorflow/tflite-micro/raw/aeac6f39e5c7475cea20c54e86d41e3a38312546/ \
#     tensorflow/lite/micro/examples/person_detection/testdata/person.bmp"
#   QUANT
# )
#
function(iree_model_input)
  cmake_parse_arguments(
    _RULE
    "QUANT;SIGNED"
    "NAME;SHAPE;SRC;RANGE"
    ""
    ${ARGN}
  )

  string(REGEX REPLACE "[ \t\r\n]" "" _RULE_SRC_TRIM ${_RULE_SRC})
  string(REGEX MATCH "^https:" _RULE_SRC_URL ${_RULE_SRC_TRIM})
  if (_RULE_SRC_URL)
    get_filename_component(_INPUT_FILENAME "${_RULE_SRC}" NAME)
    find_program(_WGET wget HINT "$ENV{PATH}" REQUIRED)
    add_custom_command(
      OUTPUT
        ${_INPUT_FILENAME}
      COMMAND
        ${_WGET} -q -P "${CMAKE_CURRENT_BINARY_DIR}" -O "${_INPUT_FILENAME}"
        "${_RULE_SRC_TRIM}"
      COMMENT
        "Download ${_INPUT_FILENAME} from ${_RULE_SRC_TRIM}"
    )
  else()
    set(_INPUT_FILENAME ${_RULE_SRC_TRIM})
  endif()

  set(_GEN_INPUT_SCRIPT "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../build_tools/gen_mlmodel_input.py")
  set(_OUTPUT_BINARY ${_RULE_NAME})
  set(_ARGS)
  list(APPEND _ARGS "--i=${_INPUT_FILENAME}")
  list(APPEND _ARGS "--o=${_OUTPUT_BINARY}")
  list(APPEND _ARGS "--s=${_RULE_SHAPE}")
  if(_RULE_RANGE)
    list(APPEND _ARGS "--r=${_RULE_RANGE}")
  endif()
  if(_RULE_QUANT)
    list(APPEND _ARGS "--q")
  endif()
  if(_RULE_SIGNED)
    list(APPEND _ARGS "--sgn")
  endif()

  # Replace dependencies passed by ::name with iree::package::name
  iree_package_ns(_PACKAGE_NS)
  list(TRANSFORM _RULE_DEPS REPLACE "^::" "${_PACKAGE_NS}::")

  # Prefix the library with the package name, so we get: iree_package_name.
  iree_package_name(_PACKAGE_NAME)

  set(_RULE_C_NAME "${_RULE_NAME}_c")
  set(_LIB_NAME "${_PACKAGE_NAME}_${_RULE_C_NAME}")
  set(_GEN_TARGET "${_LIB_NAME}_gen")
  set(_H_FILE_NAME ${_RULE_C_NAME}.h)

  add_custom_command(
    OUTPUT
      ${_OUTPUT_BINARY}
      ${_H_FILE_NAME}
    COMMAND
      ${_GEN_INPUT_SCRIPT} ${_ARGS}
    COMMAND
      xxd -i ${_OUTPUT_BINARY} > ${_H_FILE_NAME}
    DEPENDS
      ${_GEN_INPUT_SCRIPT}
      ${_INPUT_FILENAME}
  )

  add_custom_target(
    ${_GEN_TARGET}
    DEPENDS
      "${_H_FILE_NAME}"
  )

  add_library(${_LIB_NAME}
  ${_H_FILE_NAME}
 )
 add_dependencies(${_LIB_NAME} ${_GEN_TARGET})

 SET_TARGET_PROPERTIES(
   ${_LIB_NAME}
   PROPERTIES
   LINKER_LANGUAGE C
 )

 # Alias the iree_package_name library to iree::package::name.
 # This lets us more clearly map to Bazel and makes it possible to
 # disambiguate the underscores in paths vs. the separators.
 add_library(${_PACKAGE_NS}::${_RULE_C_NAME} ALIAS ${_LIB_NAME})
 iree_package_dir(_PACKAGE_DIR)
 if(${_RULE_C_NAME} STREQUAL ${_PACKAGE_DIR})
   add_library(${_PACKAGE_NS} ALIAS ${_LIB_NAME})
 endif()
endfunction()
