This repository has been archived on 2023-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
bl_mcu_sdk/CMakeLists.txt

41 lines
1.2 KiB
CMake
Raw Normal View History

2021-04-13 19:23:11 +08:00
cmake_minimum_required(VERSION 3.10)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/tools/cmake/riscv64-unknown-elf-gcc.cmake)
include(${CMAKE_SOURCE_DIR}/tools/cmake/compiler_flags.cmake)
include(${CMAKE_SOURCE_DIR}/tools/cmake/tools.cmake)
PROJECT(${BOARD} C CXX ASM)
include_directories(${CMAKE_SOURCE_DIR}/common/misc)
include_directories(${CMAKE_SOURCE_DIR}/bsp/bsp_common/platform)
2021-04-27 12:35:37 +08:00
if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/bsp/board/${BOARD})
2021-04-13 19:23:11 +08:00
include_directories(${CMAKE_SOURCE_DIR}/bsp/board/${BOARD})
2021-04-27 12:35:37 +08:00
else()
message(FATAL_ERROR "${CMAKE_SOURCE_DIR}/bsp/board/${BOARD} is not exist")
endif()
2021-04-13 19:23:11 +08:00
add_subdirectory(common)
add_subdirectory(components/fatfs)
add_subdirectory(components/usb_stack)
2021-04-27 12:35:37 +08:00
if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/drivers/${mcu}_driver)
2021-04-13 19:23:11 +08:00
add_subdirectory(drivers/${mcu}_driver)
2021-04-27 12:35:37 +08:00
else()
message(FATAL_ERROR "${CMAKE_SOURCE_DIR}/drivers/${mcu}_driver is not exist")
endif()
2021-04-13 19:23:11 +08:00
2021-04-27 12:35:37 +08:00
if(${SUPPORT_SHELL} STREQUAL "y")
2021-04-13 19:23:11 +08:00
add_subdirectory(components/shell)
2021-04-27 12:35:37 +08:00
endif()
if(${SUPPORT_FREERTOS} STREQUAL "y")
add_subdirectory(components/freertos)
endif()
if(${SUPPORT_LVGL} STREQUAL "y")
add_subdirectory(components/lvgl)
2021-04-13 19:23:11 +08:00
endif()
search_application(${CMAKE_SOURCE_DIR}/examples)