]> git.donarmstrong.com Git - kiibohd-controller.git/blob - CMakeLists.txt
DPH controller now working with macros/layers
[kiibohd-controller.git] / CMakeLists.txt
1 ###| CMAKE Kiibohd Controller |###
2 #
3 # Jacob Alexander 2011-2014
4 # Due to this file's usefulness:
5 #
6 # Released into the Public Domain
7 #
8 ###
9
10
11
12 ###
13 # Chip Selection
14 #
15
16 #| You _MUST_ set this to match the microcontroller you are trying to compile for
17 #| You _MUST_ clean the build directory if you change this value
18 #|
19 set( CHIP
20 #       "at90usb162"       # Teensy   1.0 (avr)
21 #       "atmega32u4"       # Teensy   2.0 (avr)
22 #       "at90usb646"       # Teensy++ 1.0 (avr)
23         "at90usb1286"      # Teensy++ 2.0 (avr)
24 #       "mk20dx128"        # Teensy   3.0 (arm)
25 #       "mk20dx128vlf5"    # McHCK    mk20dx128vlf5
26 #       "mk20dx256"        # Teensy   3.1 (arm)
27 )
28
29
30
31 ###
32 # Compiler Intialization
33 #
34 set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/Lib/CMake )
35 include( initialize )
36
37
38
39 ###
40 # Project Modules
41 #
42
43 #| Note: This is the only section you probably want to modify
44 #| Each module is defined by it's own folder (e.g. Scan/Matrix represents the "Matrix" module)
45 #| All of the modules must be specified, as they generate the sources list of files to compile
46 #| Any modifications to this file will cause a complete rebuild of the project
47
48 #| Please look at the {Scan,Macro,Output,Debug} for information on the modules and how to create new ones
49
50 ##| Deals with acquiring the keypress information and turning it into a key index
51 set(   ScanModule "DPH" )
52 #set(   ScanModule "MD1" )
53
54 ##| Provides the mapping functions for DefaultMap and handles any macro processing before sending to the OutputModule
55 set(  MacroModule "PartialMap" )
56
57 ##| Sends the current list of usb key codes through USB HID
58 set( OutputModule "pjrcUSB" )
59
60 ##| Debugging source to use, each module has it's own set of defines that it sets
61 set(  DebugModule "full" )
62
63
64
65 ###
66 # Keymap Configuration (do not include the .kll extension)
67 #
68
69 #| Do not include the .kll extension
70 #| * BaseMap maps the native keyboard scan codes to USB Codes so the layout is compatible with all other layouts
71 #| * DefaultMap allows the default keymap to be modified from the BaseMap
72 #| * PartialMaps is a set of dynamically set layers (there is no limit, but too many may use up too much RAM...)
73 #| BaseMap generally does not need to be changed from "defaultMap"
74 #|
75 #| Syntax:
76 #|  myMap
77 #|    * defines a single .kll layout file, double-quotes are needed to distinguish between layers
78 #|  "myMap specialLayer"
79 #|    * defines myMap to be the main layout, then replace specialLayers on top of it
80 #|
81 #| - Only for PartialMaps -
82 #|  "myMap specialLayer" "myMap colemak" dvorak
83 #|    * As before, but also generates a second layer at index 2 and third at index 3
84 #|
85 #| NOTE:  Remember to add key(s) to enable each Partial Layer
86 #| NOTE2: Layers are always based up the BaseMap (which should be an ANSI-like mapping)
87 #| NOTE3: Compiler looks in kll/layouts and the build directory for layout files (precedence on build directory)
88
89 ##| Set the base keyboard .kll map, defaults to "defaultMap" if not found
90 ##| Looks in Scan/<Module Name> for the available BaseMaps
91 ##| TODO Support layering in basemap
92 set(     BaseMap "50Key" )
93 #set(     BaseMap "defaultMap" )
94
95 ##| Layer additonal .kll maps on the BaseMap, layers are in order from 1st to nth
96 ##| Can be set to ""
97 set(  DefaultMap "colemak stdFuncMap" )
98
99 ##| ParitalMaps available on top of the BaseMap. See above for syntax on specifying multiple layers vs. layering
100 ##| Can be set to ""
101 set( PartialMaps "" )
102 #set( PartialMaps "hhkbpro2" )
103
104
105
106 ###
107 # Source Defines (in addition to the selected Modules)
108 #
109 set( MAIN_SRCS
110         main.c
111 )
112
113
114
115 ###
116 # Project Description
117 #
118
119 #| Project
120 project( kiibohd_controller )
121
122 #| Target Name (output name)
123 set( TARGET kiibohd )
124
125 #| General Settings
126 cmake_minimum_required( VERSION 2.8 )
127
128
129
130 ###
131 # Module Initialization / Compilation / Targets
132 #
133 include( modules )
134 include( kll ) # Generate kll layouts if necessary
135 include( build )
136