This demo code gives a brief guide for creating a GUI application with lvgl, lv_drivers, SDL2 and cmake.
This demo code refers from here, then modified to be compiled on Windows, MacOS and linux.
- This demo will compile SDL2 from source, and you have to install development files for it on Linux. Otherwise, the GUI application wouldn't show anything on the screen. What development files are needed could be found here for SDL2.26.x.
Generating compiler configuration
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
Compile
cmake --build build --target all package --config Release
Then, there is one LvglWithSdlDemo
binary under build/output/bin could show hello for you.