Skip to content

Commit

Permalink
Allow FetchContent usage in external projects
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovanduijn committed Jul 2, 2024
1 parent dc25b2a commit 823ec82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,6 @@ add_subdirectory(source)
add_subdirectory(tools)
add_subdirectory(test)

FetchContent_MakeAvailable(freertos_kernel cmock)
if(FREERTOS_PLUS_TCP_FETCH_FREERTOS)
FetchContent_MakeAvailable(freertos_kernel cmock)
endif()
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ FetchContent_Declare( freertos_plus_tcp
- this particular example supports a native and cross-compiled build option.

```cmake
set( FREERTOS_PLUS_FAT_DEV_SUPPORT OFF CACHE BOOL "" FORCE)
set( FREERTOS_PLUS_TCP_DEV_SUPPORT OFF CACHE BOOL "" FORCE)
# Select the native compile PORT
set( FREERTOS_PLUS_FAT_PORT "POSIX" CACHE STRING "" FORCE)
set( FREERTOS_PLUS_TCP_PORT "POSIX" CACHE STRING "" FORCE)
# Select the cross-compile PORT
if (CMAKE_CROSSCOMPILING)
# Eg. Zynq 2019_3 version of port
Expand All @@ -72,6 +72,9 @@ endif()
FetchContent_MakeAvailable(freertos_plus_tcp)
```

If you already have FreeRTOS in your project, you may skip the fetch content by setting
`FREERTOS_PLUS_TCP_FETCH_FREERTOS` to `OFF`.

### Consuming stand-alone

This repository uses [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to bring in dependent components.
Expand Down

0 comments on commit 823ec82

Please sign in to comment.