diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-27 23:22:01 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-27 23:49:37 -0600 |
commit | 88adb90f5e805bea27e619fd5209ef58dbff6fd1 (patch) | |
tree | c3e24877b40ce183f1d72f6e064b0478ecf92207 /libhw/CMakeLists.txt | |
parent | 89761191a98f7dce4d1049b9a84c3d645378222a (diff) |
Factor out a libhw
Diffstat (limited to 'libhw/CMakeLists.txt')
-rw-r--r-- | libhw/CMakeLists.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libhw/CMakeLists.txt b/libhw/CMakeLists.txt new file mode 100644 index 0000000..ca58a72 --- /dev/null +++ b/libhw/CMakeLists.txt @@ -0,0 +1,30 @@ +# libhw/CMakeLists.txt - TODO +# +# Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com> +# SPDX-Licence-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_hwspi.c + w5500.c + ) + target_link_libraries(libhw INTERFACE + pico_time + 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_net.c + ) +endif() |