Skip to content

netutils/libwebsockets: add cmake support - #3275

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
yjq91115:master
Dec 25, 2025
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
yjq91115:master

Conversation

@yjq91115

@yjq91115 yjq91115 commented Dec 24, 2025 •

Copy link
Copy Markdown
Contributor

Summary

Add CMake build support for libwebsockets, allowing it to be configured and built as part of NuttX using a CMake-based workflow. This change fills the gap where only other build systems were supported, by introducing/updating the necessary CMake configuration and target definitions so that compile options, include paths, and link dependencies are correctly resolved and integrated under CMake.

Impact

  • Build process: CMake-based builds can now build and link libwebsockets directly, reducing manual integration effort (e.g., custom Makefiles/scripts).

Testing

add libwebsockets cmake support

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
@acassis
acassis requested a review from simbit18 December 24, 2025 13:44
@acassis

acassis commented Dec 24, 2025

Copy link
Copy Markdown
Contributor

@yjq91115 do you have some sample example that uses libwebsockets?

@xiaoxiang781216
xiaoxiang781216 merged commit 837c27d into apache:master Dec 25, 2025
40 checks passed
@yjq91115

yjq91115 commented Dec 25, 2025 •

Copy link
Copy Markdown
Contributor Author

@yjq91115 do you have some sample example that uses libwebsockets?

Currently, this patch only supports CMake compilation, which has the same capabilities as a Makefile. There are still some compilation issues in the libwebsocket library, which will be fixed later to ensure proper functionality. Do you think this patch should be merged in first? @acassis

@acassis

acassis commented Dec 25, 2025

Copy link
Copy Markdown
Contributor

@yjq91115 do you have some sample example that uses libwebsockets?

Currently, this patch only supports CMake compilation, which has the same capabilities as a Makefile. There are still some compilation issues in the libwebsocket library, which will be fixed later to ensure proper functionality. Do you think this patch should be merged in first? @acassis

Hi @yjq91115 yes both CMake and Makefile are equivalent, but NuttX needs both to work correctly, many users are still using Makefile because it was the only option for a long time (and I think it still the default option).

Please submit some sample code to let users to test it easily, i.e. integrated on sim board config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants