diff options
| author | Liam Fraser <[email protected]> | 2024-07-18 11:08:23 +0100 |
|---|---|---|
| committer | Liam Fraser <[email protected]> | 2024-07-18 11:10:55 +0100 |
| commit | 23c9353cd86bcecd9d1220bbb2277d5ffb834e7c (patch) | |
| tree | d66d711da78d8b2bb28d75a53acaf26f1b7ced09 | |
| parent | 3804ab9a67737732fe6bcc8e0b016ea00d47ff12 (diff) | |
net_lwip_webserver: allow TINYUSB_LWIP_PATH to be defined by parent CMake file
| -rw-r--r-- | examples/device/net_lwip_webserver/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/device/net_lwip_webserver/CMakeLists.txt b/examples/device/net_lwip_webserver/CMakeLists.txt index c39fd32c5..13923b583 100644 --- a/examples/device/net_lwip_webserver/CMakeLists.txt +++ b/examples/device/net_lwip_webserver/CMakeLists.txt @@ -5,7 +5,14 @@ include(${CMAKE_CURRENT_LIST_DIR}/../../../hw/bsp/family_support.cmake) # gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>) family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) +# Prefer the tinyusb lwip set(LWIP ${TOP}/lib/lwip) + +# If we can't find one from tinyusb then check cmake var before giving up +if (NOT EXISTS ${LWIP}/src) + set(LWIP ${TINYUSB_LWIP_PATH}) +endif() + if (NOT EXISTS ${LWIP}/src) family_example_missing_dependency(${PROJECT} "lib/lwip") return() |
