Using Waveshare LCD libraries in my Pico-W project using cmake files (and an issue with Wifi libs)

May 18, 2024, 03:27

lil_india

Quick summary of my project is that I'm trying to build a "Spotify iPod" device with my Pico-W. I purchased a Waveshare display that comes with a library. I have a lib folder that contains my pico-sdk and my Waveshare display library. I have little experience using cmake but was able to get the pico-sdk pico_stdlib working included into my project and working. But, I haven't been able to import my display libraries and can only use them without the hacky workaround of copying the header files to a separate directory and importing from there (in an effort to bypass cmake for that library). I want the project structure to look sensible so I want to do it the legit way through cmake. In line with that issue, I also need to use the cwy43_arch code in the pico-sdk which I haven't been able to import the same way I did pico_stdlib. In summary, I need help understanding how the heck CMake works in my project. Attached is my project structure in VSCode. My CMakeLists.txt files in my project directory, src, and lib. And my main.c file that is trying to access the display libraries. Here is the error message I get as well:
/home/dev/SpotifyPico/src/main.c:6:10: fatal error: LCD/LCD_1in3.h: No such file or directory
    6 | #include "LCD/LCD_1in3.h"
Please let me know if additional context, code, screenshots, etc. are needed.