Added CMake.
This commit is contained in:
parent
d2fa7edafb
commit
0c4d9227b2
|
@ -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})
|
Loading…
Reference in New Issue