kendryte-freertos-sdk/CMakeLists.txt

29 lines
946 B
CMake
Raw Normal View History

2019-05-29 03:56:25 -04:00
# DO NOT MODIFY THIS FILE, IT WILL BE OVERRIDE!!!
2018-09-13 09:42:46 -04:00
# set this will supress some warnings
set(BUILDING_SDK "yes" CACHE INTERNAL "")
# basic config
if (NOT PROJ)
get_filename_component(PROJ ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
get_filename_component(PROJ ${PROJ} NAME)
string(REPLACE " " "_" PROJ ${PROJ})
message(STATUS "PROJ not set, use ${PROJ} as PROJ. Also, you can set it manually. e.g. -DPROJ=hello_world")
2018-09-13 09:42:46 -04:00
else()
message("PROJ = ${PROJ}")
endif ()
cmake_minimum_required(VERSION 3.0)
include(./cmake/common.cmake)
project(${PROJ})
2018-11-01 00:16:51 -04:00
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/lib/arch/include ${CMAKE_CURRENT_LIST_DIR}/lib/utils/include)
2018-09-13 09:42:46 -04:00
# config self use headers
header_directories(${SDK_ROOT}/lib)
# build library first
add_subdirectory(lib SDK)
2018-10-23 03:31:55 -04:00
add_subdirectory(third_party)
2018-09-13 09:42:46 -04:00
# compile project
add_source_files(src/${PROJ}/*.c src/${PROJ}/*.s src/${PROJ}/*.S src/${PROJ}/*.cpp)
2019-05-29 03:56:25 -04:00
include(./cmake/executable.cmake)