Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake library for WiFi #35

Open
glebm opened this issue Oct 6, 2024 · 0 comments
Open

CMake library for WiFi #35

glebm opened this issue Oct 6, 2024 · 0 comments

Comments

@glebm
Copy link

glebm commented Oct 6, 2024

Currently it is possible to use Portduino WiFi from CMake by defining the library manually like so:

FetchContent_Declare(PortduinoWifi
  URL https://github.com/meshtastic/WiFi/archive/b885b9595d54ee6eae59696eeae98f631eb27a23.tar.gz
  URL_HASH MD5=af81fff3f7cd2127cf54d5cfc13a95ef
  EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(PortduinoWifi)

add_library(PortduinoWifi STATIC
  ${portduinowifi_SOURCE_DIR}/src/WiFiClient.cpp
  ${portduinowifi_SOURCE_DIR}/src/WiFi.cpp
  ${portduinowifi_SOURCE_DIR}/src/WiFiServer.cpp
  ${portduinowifi_SOURCE_DIR}/src/WiFiUdp.cpp
)
target_include_directories(PortduinoWifi PUBLIC ${portduinowifi_SOURCE_DIR}/src)
target_link_libraries(PortduinoWifi PUBLIC Portduino::Portduino)

(the Portduino::Portduino target ehre is from #34)

It'd be better if https://github.com/meshtastic/WiFi provided a target instead.

Posting here because https://github.com/meshtastic/WiFi does not have Issues enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant