|
|
@ -14,3 +14,19 @@ if(TARGET bspMCU) |
|
|
else() |
|
|
else() |
|
|
message(FATAL_ERROR "[${TARGET_NAME}] Dependency 'bspMCU' not found.") |
|
|
message(FATAL_ERROR "[${TARGET_NAME}] Dependency 'bspMCU' not found.") |
|
|
endif() |
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
get_filename_component(ROBOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE) |
|
|
|
|
|
file(GLOB PROJECT_DIRS LIST_DIRECTORIES true "${ROBOT_DIR}/project/*") |
|
|
|
|
|
foreach(PROJ_DIR ${PROJECT_DIRS}) |
|
|
|
|
|
if(IS_DIRECTORY "${PROJ_DIR}") |
|
|
|
|
|
get_filename_component(PROJ_NAME "${PROJ_DIR}" NAME) |
|
|
|
|
|
string(TOUPPER "${PROJ_NAME}" PROJ_NAME_UPPER) |
|
|
|
|
|
if(BUILD_${PROJ_NAME_UPPER}) |
|
|
|
|
|
set(PROTOBUF_PSOURCE "${PROJ_DIR}/Protobuf/PSource") |
|
|
|
|
|
if(EXISTS "${PROTOBUF_PSOURCE}") |
|
|
|
|
|
target_include_directories(${TARGET_NAME} PUBLIC "${PROTOBUF_PSOURCE}") |
|
|
|
|
|
message(STATUS "[${TARGET_NAME}] Auto-detected protobuf include: ${PROTOBUF_PSOURCE}") |
|
|
|
|
|
endif() |
|
|
|
|
|
endif() |
|
|
|
|
|
endif() |
|
|
|
|
|
endforeach() |