29 lines
934 B
CMake
29 lines
934 B
CMake
#project(maix_drivers)
|
|
|
|
# create driver library
|
|
|
|
FILE(GLOB_RECURSE LIB_SRC
|
|
"${CMAKE_CURRENT_LIST_DIR}/*.h"
|
|
"${CMAKE_CURRENT_LIST_DIR}/*.hpp"
|
|
"${CMAKE_CURRENT_LIST_DIR}/*.c"
|
|
"${CMAKE_CURRENT_LIST_DIR}/*.cpp"
|
|
"${CMAKE_CURRENT_LIST_DIR}/*.s"
|
|
"${CMAKE_CURRENT_LIST_DIR}/*.S"
|
|
)
|
|
|
|
FILE(GLOB_RECURSE ASSEMBLY_FILES
|
|
"${CMAKE_CURRENT_LIST_DIR}/*.s"
|
|
"${CMAKE_CURRENT_LIST_DIR}/*.S"
|
|
)
|
|
|
|
include_directories(${SDK_ROOT}/third_party/xtl/include)
|
|
include_directories(${CMAKE_CURRENT_LIST_DIR}/drivers/include ${CMAKE_CURRENT_LIST_DIR}/bsp/include ${CMAKE_CURRENT_LIST_DIR}/nncase/include)
|
|
|
|
SET_PROPERTY(SOURCE ${ASSEMBLY_FILES} PROPERTY LANGUAGE C)
|
|
SET_SOURCE_FILES_PROPERTIES(${ASSEMBLY_FILES} PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp -D __riscv64")
|
|
|
|
ADD_LIBRARY(kendryte
|
|
${LIB_SRC}
|
|
)
|
|
SET_TARGET_PROPERTIES(kendryte PROPERTIES LINKER_LANGUAGE C)
|