I'm interested in possibly picking up a copy of CLion to use with platformio to develop for the esp8266, but I'm having a hard time figuring out how to include libraries from the Arduino directories. Part of the problem is how Arduino goes about laying out it's library directories. They are scattered all over the place. The core libraries are in one place under .arduino15 and platformio creates it's own folders in a similar fashion under .platformio. But even those are split up into cores vs hardware folders depending on what device(s) you are programming. Then Arduino puts the various module/shield libraries each in a separate directory, sometimes in the root of said directory, sometimes under a 'src' subdir.
Short of going into the CMakeLists.txt file manually and throwing a whole slew of values in the includes, I haven't found any other way to include libraries in specific locations. Is there a gui tool anywhere for modifying the CMakeLists.txt and is there any way of globbing or something similar to have it look for the libraries?
I am aware that if you run 'platformio lib install [libraryname]' it will plop them in .piolibdeps in the root folder of the project with a CMakeLists.txt file with it, and initializing the product with --ide clion also creates a CMakeLists.txt in the root folder, but it still doesn't seem to create anything that will resolve the libs and the various files in piolibdeps are still broken into separate folders. Furthermore, they aren't resolveable by default within the CLion IDE (showing read and non-click-able with ctrl-click) unless you again manually insert each folder in CMakeLists.txt.
Is there some better way of adding the libs or an easier way to get CLion to include the libs in the external libraries?