FindChibiOS.cmake 627 B

12345678910111213141516
  1. IF(NOT CHIBIOS_ROOT)
  2. SET(CHIBIOS_ROOT /usr/src/chibios)
  3. MESSAGE(STATUS "No CHIBIOS_ROOT specified, using default: ${CHIBIOS_ROOT}")
  4. ENDIF()
  5. IF(ChibiOS_FIND_VERSION_MAJOR EQUAL 2)
  6. MESSAGE(FATAL_ERROR "ChibiOS v2.x.x is not supported. Use older version of stm32-cmake")
  7. ELSEIF((NOT ChibiOS_FIND_VERSION_MAJOR) OR (ChibiOS_FIND_VERSION_MAJOR EQUAL 3))
  8. INCLUDE(ChibiOS3)
  9. ENDIF()
  10. LIST(REMOVE_DUPLICATES ChibiOS_INCLUDE_DIRS)
  11. LIST(REMOVE_DUPLICATES ChibiOS_SOURCES)
  12. INCLUDE(FindPackageHandleStandardArgs)
  13. FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS DEFAULT_MSG ChibiOS_SOURCES ChibiOS_INCLUDE_DIRS ChibiOS_LINKER_SCRIPT)