# libhw/CMakeLists.txt - TODO # # Copyright (C) 2024 Luke T. Shumaker # SPDX-License-Identifier: AGPL-3.0-or-later add_library(libhw INTERFACE) target_include_directories(libhw SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/common_include) target_link_libraries(libhw INTERFACE libmisc ) if (PICO_PLATFORM STREQUAL "rp2040") target_include_directories(libhw SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/rp2040_include) target_sources(libhw INTERFACE rp2040_bootclock.c rp2040_hwspi.c w5500.c ) target_link_libraries(libhw INTERFACE pico_time hardware_timer hardware_gpio hardware_spi ) endif() if (PICO_PLATFORM STREQUAL "host") target_include_directories(libhw SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/host_include) target_sources(libhw INTERFACE host_bootclock.c host_net.c ) endif()