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 3.7KB

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