-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
108 lines (77 loc) · 2.22 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
###| CMAKE Kiibohd Controller |###
#
# Jacob Alexander 2011-2016
# Due to this file's usefulness:
#
# Released into the Public Domain
#
###
###
# Chip Selection
#
#| You _MUST_ set this to match the microcontroller you are trying to compile for
#| You _MUST_ clean the build directory if you change this value
#|
set( CHIP
# "at90usb162" # Teensy 1.0 (avr)
# "atmega32u4" # Teensy 2.0 (avr)
# "at90usb646" # Teensy++ 1.0 (avr)
# "at90usb1286" # Teensy++ 2.0 (avr)
# "mk20dx128" # Teensy 3.0 (arm)
# "mk20dx128vlf5" # McHCK mk20dx128vlf5
"mk20dx256" # Teensy 3.1 (arm)
# "mk20dx256vlh7" # Kiibohd-dfu mk20dx256vlh7
CACHE STRING "Microcontroller Chip"
)
###
# Compiler Selection
#
#| gcc has been tested much more (and will likely give smaller binaries)
#| clang does work though
#| Currently only arm is supported with clang
set( COMPILER
"gcc" # arm-none-eabi-gcc / avr-gcc - Default
# "clang" # arm-none-eabi
CACHE STRING "Compiler Type"
)
###
# Compiler Intialization
#
set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/Lib/CMake )
include( initialize )
###
# Project Modules
#
#| Note: This is the only section you probably want to modify
#| Each module is defined by it's own folder (e.g. Scan/Matrix represents the "Matrix" module)
#| All of the modules must be specified, as they generate the sources list of files to compile
#| Any modifications to this file will cause a complete rebuild of the project
#| Please look at the {Output,Debug} for information on the modules and how to create new ones
##| Sends the current list of usb key codes through USB HID
set( OutputModule "pjrcUSB"
CACHE STRING "Output Module"
)
##| Debugging source to use, each module has it's own set of defines that it sets
set( DebugModule "full"
CACHE STRING "Debug Module"
)
###
# Source Defines (in addition to the selected Modules)
#
set( MAIN_SRCS
main.c
)
###
# Project Description
#
#| Project
project( kiibohd_controller )
#| Target Name (output name)
set( TARGET kiibohd )
#| General Settings
cmake_minimum_required( VERSION 2.8 )
###
# Module Initialization / Compilation / Targets
#
include( modules )
include( build )