forked from altexdim/arduino-cmake
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathCMakeLists.txt
31 lines (24 loc) · 1.36 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#=============================================================================#
# Author: QueezyTheGreat #
# Date: 26.04.2011 #
# #
# Description: Arduino CMake example #
# #
#=============================================================================#
# this line is needed only if you use boards with selectable cpu (like mega, pro etc)
# and this line should go before call to "cmake/ArduinoToolchain.cmake"
# this is durty hack and should be fixed somewhen, because it should go to
# particular cmake subdirectory
set(ARDUINO_CPU 16MHzatmega328)
set(CMAKE_TOOLCHAIN_FILE cmake/ArduinoToolchain.cmake) # Arduino Toolchain
cmake_minimum_required(VERSION 2.8)
#====================================================================#
# Setup Project #
#====================================================================#
project(ArduinoExample C CXX)
print_board_list()
print_programmer_list()
# add libraries to project
link_directories(${ARDUINO_SDK}/libraries)
# add the project directory into build
add_subdirectory(example)