Added CMake.

This commit is contained in:
imi415 2022-06-10 01:26:51 +08:00
parent d2fa7edafb
commit 0c4d9227b2
Signed by: imi415
GPG Key ID: 885EC2B5A8A6F8A7
5 changed files with 21 additions and 0 deletions

21
CMakeLists.txt Normal file
View File

@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.10)
project(fatfs)
if(NOT FATFS_CONFIG_DIRECTORY)
message(FATAL_ERROR "FATFS_CONFIG_DIRECTORY should be defined")
elseif(NOT EXISTS ${FATFS_CONFIG_DIRECTORY}/ffconf.h)
message(FATAL_ERROR "ffconf.h should be included in the directory.")
endif()
set(FATFS_SRCS
"source/ff.c"
"source/ffunicode.c"
)
set(FATFS_INCS
"include"
)
add_library(${PROJECT_NAME} ${FATFS_SRCS})
target_include_directories(${PROJECT_NAME} PUBLIC ${FATFS_INCS} ${FREERTOS_CONFIG_FILE_DIRECTORY})