1 ###| CMAKE Kiibohd Controller |###
3 # Jacob Alexander 2011-2014
4 # Due to this file's usefulness:
6 # Released into the Public Domain
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
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 CACHE STRING "Microcontroller Chip" )
32 # Compiler Intialization
34 set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/Lib/CMake )
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
48 #| Please look at the {Scan,Macro,Output,Debug} for information on the modules and how to create new ones
50 ##| Deals with acquiring the keypress information and turning it into a key index
52 CACHE STRING "Scan Module" )
54 ##| Provides the mapping functions for DefaultMap and handles any macro processing before sending to the OutputModule
55 set( MacroModule "PartialMap"
56 CACHE STRING "Macro Module" )
58 ##| Sends the current list of usb key codes through USB HID
59 set( OutputModule "pjrcUSB"
60 CACHE STRING "Output Module" )
62 ##| Debugging source to use, each module has it's own set of defines that it sets
63 set( DebugModule "full"
64 CACHE STRING "Debug Module" )
69 # Keymap Configuration (do not include the .kll extension)
72 #| Do not include the .kll extension
73 #| * BaseMap maps the native keyboard scan codes to USB Codes so the layout is compatible with all other layouts
74 #| * DefaultMap allows the default keymap to be modified from the BaseMap
75 #| * PartialMaps is a set of dynamically set layers (there is no limit, but too many may use up too much RAM...)
76 #| BaseMap generally does not need to be changed from "defaultMap"
80 #| * defines a single .kll layout file, double-quotes are needed to distinguish between layers
81 #| "myMap specialLayer"
82 #| * defines myMap to be the main layout, then replace specialLayers on top of it
84 #| - Only for PartialMaps -
85 #| "myMap specialLayer" "myMap colemak" dvorak
86 #| * As before, but also generates a second layer at index 2 and third at index 3
88 #| NOTE: Remember to add key(s) to enable each Partial Layer
89 #| NOTE2: Layers are always based up the BaseMap (which should be an ANSI-like mapping)
90 #| NOTE3: Compiler looks in kll/layouts and the build directory for layout files (precedence on build directory)
92 ##| Set the base keyboard .kll map, defaults to "defaultMap" if not found
93 ##| Looks in Scan/<Module Name> for the available BaseMaps
94 ##| TODO Support layering in basemap
95 set( BaseMap "defaultMap"
96 CACHE STRING "KLL BaseMap/Scancode Keymapping" )
98 ##| Layer additonal .kll maps on the BaseMap, layers are in order from 1st to nth
100 set( DefaultMap "md1Overlay stdFuncMap"
101 CACHE STRING "KLL DefaultMap" )
103 ##| ParitalMaps available on top of the BaseMap. See above for syntax on specifying multiple layers vs. layering
105 set( PartialMaps "hhkbpro2"
106 CACHE STRING "KLL PartialMaps/Layer Definitions" )
111 # Source Defines (in addition to the selected Modules)
120 # Project Description
124 project( kiibohd_controller )
126 #| Target Name (output name)
127 set( TARGET kiibohd )
130 cmake_minimum_required( VERSION 2.8 )
135 # Module Initialization / Compilation / Targets
138 include( kll ) # Generate kll layouts if necessary