diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c18bb63a..a2a1efe1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/etc/cmake/functions.cmake b/etc/cmake/functions.cmake index ffafe48ad..4cb0bef8c 100755 --- a/etc/cmake/functions.cmake +++ b/etc/cmake/functions.cmake @@ -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)