cmake_minimum_required(VERSION 3.13)

#program's name
set(program_name "pico-program_CHANGE-ME")
#TODO: change the program name and erase this comment

#build vars
set(FAMILY rp2040)
set(BOARD pico_sdk)

#sdk location
set(sdk_path "/opt/pico-sdk")

# initialize pico-sdk from submodule
# note: this must happen before project()
include(${sdk_path}/pico_sdk_init.cmake)

project(${program_name})

# initialize the Raspberry Pi Pico SDK
pico_sdk_init()


add_executable(${program_name})

# List all (.c) source files used in your program
target_sources(${program_name} PUBLIC
	src/main.c
   )

# Add pico_stdlib library which aggregates commonly used features
target_link_libraries(${program_name} pico_stdlib)

# locations of extra non-library headers (.h)
target_include_directories(${program_name}
	PUBLIC
	${CMAKE_CURRENT_SOURCE_DIR}/src
   )

# create map/bin/hex/uf2 file in addition to ELF.
pico_add_extra_outputs(${program_name})
