blob: 5309f5cf479aa0f1fc48d87498d7ec4b3a152089 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
include(utils)
function (create_device_target arch_flags device_defines include_dirs linker_script system_code)
add_library(device OBJECT)
target_sources(device PRIVATE "${system_code}")
target_compile_options(device PUBLIC "${arch_flags}")
target_compile_definitions(device PUBLIC "${device_defines}")
target_include_directories(device PRIVATE "${include_dirs}")
target_include_directories(device PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/device")
target_link_options(device INTERFACE "${arch_flags}")
target_linker_script(device INTERFACE "${linker_script}")
endfunction ()
|