|
|
@ -1,5 +1,7 @@ |
|
|
|
cmake_minimum_required(VERSION 3.13) |
|
|
|
|
|
|
|
cmake_policy(SET CMP0054 NEW) |
|
|
|
|
|
|
|
if (NOT C6416_SDK_PATH) |
|
|
|
set(C6416_SDK_PATH ${CMAKE_CURRENT_LIST_DIR}) |
|
|
|
endif() |
|
|
@ -14,8 +16,10 @@ endif() |
|
|
|
|
|
|
|
if (DEFINED PLAT) |
|
|
|
set(PLATFORMS ${PLAT}) |
|
|
|
elseif (DEFINED ENV{PLAT}) |
|
|
|
set(PLATFORMS $ENV{PLAT}) |
|
|
|
else() |
|
|
|
set(PLATFORMS "dsk" "S01") |
|
|
|
set(PLATFORMS "dsk") |
|
|
|
endif() |
|
|
|
|
|
|
|
# add cmake to module path |
|
|
@ -47,8 +51,20 @@ add_subdirectory(${C6416_SDK_PATH}/dsplib) |
|
|
|
add_subdirectory(${C6416_SDK_PATH}/imglib) |
|
|
|
add_subdirectory(${C6416_SDK_PATH}/src) |
|
|
|
|
|
|
|
foreach (plt IN LISTS PLATFORMS) |
|
|
|
add_subdirectory(${C6416_SDK_PATH}/platforms/${plt}) |
|
|
|
foreach (_plt IN LISTS PLATFORMS) |
|
|
|
if (x${_plt} STREQUAL x"") |
|
|
|
message(FATAL_ERROR "platform: please specify PLAT.") |
|
|
|
endif() |
|
|
|
|
|
|
|
message(STATUS "platform: ${_plt}") |
|
|
|
|
|
|
|
get_filename_component(plt_dir ${C6416_SDK_PATH}/platforms/${_plt} REALPATH) |
|
|
|
|
|
|
|
if (NOT EXISTS ${plt_dir}) |
|
|
|
message(FATAL_ERROR "platform: ${_plt} isn't exist.") |
|
|
|
endif() |
|
|
|
|
|
|
|
add_subdirectory(${plt_dir}) |
|
|
|
endforeach() |
|
|
|
|
|
|
|
add_custom_command(TARGET ${tgt_name} POST_BUILD |
|
|
|