Updated readme, etc.

This commit is contained in:
PProvost
2020-05-13 11:47:56 -06:00
parent 9f648c4e54
commit 40081863d5
8 changed files with 182 additions and 1 deletions

15
cmake/utilities.cmake Normal file
View File

@@ -0,0 +1,15 @@
# Add the required subdirectory and register it for linkage
function(add_azrtos_component_dir dirname)
# Store the current list in a temp
set(tmp ${azrtos_targets})
# Add the subdir
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/lib/${dirname})
# If there is a linker script defined, use it
if(EXISTS ${LINKER_SCRIPT})
target_link_options(${dirname} INTERFACE -T ${LINKER_SCRIPT})
endif()
# Add this target into the temp
list(APPEND tmp "azrtos::${dirname}")
# Copy the temp back up to the parent list
set(azrtos_targets ${tmp} PARENT_SCOPE)
endfunction()