lvgl / lv_port_pc_vscode

MIT License
239 stars 147 forks source link

Add CMake file to build under Windows #1

Open boraozgen opened 3 years ago

boraozgen commented 3 years ago

Adds the possibility to use the VSCode simulator under Windows.

One must download SDL and set the CMake cache variable LVGL_SIMULATOR_SDL_DIR to the root of the respective architecture (e.g. <download-path>/SDL2-2.0.14/x86_64-w64-mingw32). Eventually this could be done by CMake automatically.

I only tested with MinGW, some adaptations might be needed to get this working on Linux. There we have the Makefile option, so this does not break anything.

The respective CMake PRs in lv_drivers and lv_examples must be merged before this.

Also adds the keyboard initialization to main. This was enabled in Visual Studio by default.

Related but bit out of scope: I believe the simulators should be merged into a single platform-independent repo to avoid duplication.