# This file was autogenerated by cmake\scripts\cmake_easy_setup.py.
# Use it in your CMake configuration by `include()`'ing it.
# You can also copy it in your sketch's folder and edit it to fit your project.

cmake_minimum_required(VERSION 3.21)

# STEP 1: set up bases of environment
# -----------------------------------------------------------------------------

file(REAL_PATH "../../../../" CORE_PATH EXPAND_TILDE)
file(TO_CMAKE_PATH "${CORE_PATH}" CORE_PATH)

if(NOT DEFINED BOARDNAME)
  MESSAGE(STATUS "BOARDNAME is not defined set it to NUCLEO_F103RB")
  set(BOARDNAME "NUCLEO_F103RB")
endif()

list(APPEND CMAKE_MODULE_PATH ${CORE_PATH}/cmake)
set(CMAKE_TOOLCHAIN_FILE toolchain)


# You may remove this block when using this file as the sketch's CMakeLists.txt
if (NOT ${CMAKE_PARENT_LIST_FILE} STREQUAL ${CMAKE_CURRENT_LIST_FILE})
    # When we are imported from the main CMakeLists.txt, we should stop here
    # not to interfere with the true build config.
    return()
endif()

project("BareMinimum_project")

# STEP 2: configure the build
# -----------------------------------------------------------------------------
include(set_board)
set_board("${BOARDNAME}")

include(overall_settings)
overall_settings()

include(build_sketch)
build_sketch(TARGET "BareMinimum"
  SOURCES
  BareMinimum.ino
  DEPENDS
  CMSIS_DSP
  EEPROM
  IWatchdog
  Servo
  SoftwareSerial
  SPI
  Wire
)
