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.

initialize.cmake 907B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ###| CMAKE Kiibohd Controller Initialization |###
  2. #
  3. # Written by Jacob Alexander in 2011-2014 for the Kiibohd Controller
  4. #
  5. # Released into the Public Domain
  6. #
  7. ###
  8. #| Windows / Cygwin Compatibility options
  9. set( CMAKE_LEGACY_CYGWIN_WIN32 0 )
  10. set( CMAKE_USE_RELATIVE_PATHS 1 )
  11. ###
  12. # Compiler Lookup
  13. #
  14. #| avr match
  15. if ( "${CHIP}" MATCHES "^at90usb.*$" OR "${CHIP}" MATCHES "^atmega.*$" )
  16. set( COMPILER_FAMILY "avr" )
  17. #| arm match
  18. elseif ( "${CHIP}" MATCHES "^mk20dx.*$" )
  19. set( COMPILER_FAMILY "arm" )
  20. #| Invalid CHIP
  21. else ()
  22. message( FATAL_ERROR "CHIP: ${CHIP} - Unknown chip, could not choose compiler..." )
  23. endif ()
  24. #| Results of Compiler Lookup
  25. message( STATUS "Compiler Family:" )
  26. message( "${COMPILER_FAMILY}" )
  27. #| Load the compiler family specific configurations
  28. include( Lib/CMake/${COMPILER_FAMILY}.cmake )
  29. #| Binutils not set by CMake
  30. set( CMAKE_SIZE "${_CMAKE_TOOLCHAIN_PREFIX}size" )