Kiibohd Controller
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

CMakeLists.txt 4.2KB

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