mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[cmake] add external platform support (#5693)
This commit adds external platform support into cmake build system.
This commit is contained in:
@@ -152,6 +152,8 @@ list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/include)
|
||||
if(OT_PLATFORM STREQUAL "posix")
|
||||
target_include_directories(ot-config INTERFACE ${PROJECT_SOURCE_DIR}/src/posix/platform)
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/src/posix/platform")
|
||||
elseif(OT_PLATFORM STREQUAL "external")
|
||||
# skip in this case
|
||||
elseif(OT_PLATFORM)
|
||||
target_include_directories(ot-config INTERFACE ${PROJECT_SOURCE_DIR}/examples/platforms/${OT_PLATFORM})
|
||||
add_subdirectory("${PROJECT_SOURCE_DIR}/examples/platforms/${OT_PLATFORM}")
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
# Get a list of the available platforms and output as a list to the 'arg_platforms' argument
|
||||
function(ot_get_platforms arg_platforms)
|
||||
list(APPEND result "NO" "posix")
|
||||
list(APPEND result "NO" "posix" "external")
|
||||
set(platforms_dir "${PROJECT_SOURCE_DIR}/examples/platforms")
|
||||
file(GLOB platforms RELATIVE "${platforms_dir}" "${platforms_dir}/*")
|
||||
foreach(platform IN LISTS platforms)
|
||||
|
||||
Reference in New Issue
Block a user