The Websockets2_Generic is a library. When I add it via the dropdown, #include <WebSockets2_Generic.h> gets added to the ino file.
Then it is detected in the output as:
Building libraries ...
Using library WebSockets2_Generic version 1.13.2 by Khoi Hoang <khoih.prog@gmail.com> in folder "file:///C:/Users/daniel/Documents/Arduino/libraries/WebSockets2_Generic"
I installed it via Arduino2 IDE, including all dependencies.
I also get this output when I set the board.txt properties:
vm.preproc.lib-search.lib-in-lib=all
vm.preproc.lib-search.lib-in-sketch=all
So why does the default setting not work with that library in my custom header file?
Just for fun, I tried with another library and the default settings, ArduinoJSON in this case. Same result, the header is not found because the library is not detected and thus, the Include settings are not adapted.
Using platform libraries (SPI, SDFat, ...), they are all good.