webui
webui copied to clipboard
Draft: Add CMake build system
Add CMake build system
New CMakeLists.txt to let users build the libraries using CMake Build CivetWeb and then use it to build WebUI
For some reason the linking works fine on all Linux compilers but fails on the _mg_websocket_write
symbol linking. Anyone have any idea ?
Do you mean this problem with cmake ? I am currently developing under arch linux, and the original makefile and zig builds are fine And to be honest, I don't like cmake
I don't use cmake either, but if a PR provides a fully working cmake script, then it will be welcomed as for sure many people may prefer cmake over makefile/zig.
On the other hand, webui is simple, one .c
file, so cmake may be overkill, in my opinion.
I suggest providing CMakeLists.txt
only while keeping the original CI (GitHub Workflow) untouched as it's working fine now.
cmake is like the zig build, is an extra if anyone needs it.
Thank you @NicolasBFR for this PR by the way 👍
I suggest providing
CMakeLists.txt
only while keeping the original CI (GitHub Workflow) untouched as it's working fine now. cmake is like the zig build, is an extra if anyone needs it.
@AlbertShown
I just wanted to make sure it would technically work for all platforms, unfortunately there is a linker error and I have no Mac or Windows installation to debug it.
CMake is obviously not necessary for a small project like this, but I needed it to import the webui target in a bigger project (AI inference application).
It builds fine on Arch Linux and Ubuntu, should I remove the CI changes, squash history and remove the draft status of the PR ?
Don't worry, we need to wait @hassandraga for a decision
On the other hand, webui is simple, one .c file, so cmake may be overkill, in my opinion.
This is really not transparent from reading the README tbh. If using WebUI is as simple as adding a single .c file in a project, I would suggest this to be advertised in the README instead of only showing an opinionated build process. That would likely refrain many people from thinking "ok, where is the CMakeFile" or whetever other build system they want to use.