I have tried creating a project for Eclipse with SDL that I’m planning to use with a PC simulator. I have tried different simulators on Linux but as soon as I included the UI folder I get error when trying to use cMake to try to make an executable file. I don’t know how to edit the root CMakeLists.txt file for this to work.
I have included the lv_drivers folder, lvconf.h and lv_drv_conf.h files that also get generated by Squarline studio.
So the question here is, how do I edit the root CMakeLists.txt file and which folders and files should I include when I use the Linux SDL LVGL simulator?
Eclipse has its own build-system, and doesn’t use CMake by default. Though Eclipse project/generator/make-files can be generated by CMake with cmake -G "Eclipse4 - Ninja" or -G "Eclipse CDT4 - Unix Makefiles" arguments, but not convertable backwards to incorporate any modified Eclipse settings back to CMakeLists.txt AFAIK. I attached my custom CMakeLists.txt that works fine for me with exported SquareLine projects/UI on Linux in commandline and VScode. (I think you’ll see some CMake board-template created with it soon as well…) CMakeLists.txt (757 Bytes)
The thing is, I don’t use the Eclipse IDE at the moment for this test. It just happened to be the option available on SLS when exporting the project SDL. I have also tried the Visual Studio Code with SDL as well. But same problem there.
What I what to accomplish for now is using the exported c code project files from SLS and using Linux Command line to run a generated Executable file for the UI.
Thanks for the CMakeLists.txt file I will try it out and give you feedback.
Maybe it’s obvious, but just in case: you need to have libsdl2-dev SDL2 development package installed for CMakeLists.txt to find it. (Or SDL2 built and installed from source.)