I have found that when I compile locally I don’t need a path in my includes as they are all in the same directory, however when I use it as a library in the IDE I need to include the path to the header file in the examples. I would like to not have to change the include paths in the example files when I build locally and in the IDE. I was wondering if there was a flag what was defined when building in the different environments.
For example in the PietteTech_DHT library I have to include the library .h file in the example using the following path when compiling in the IDE
#include "PietteTech_DHT/PietteTech_DHT.h" // Uncomment if building in IDE
//#include "PietteTech_DHT.h" // Uncomment if building using CLI
If would be nice if I could just test #if defined(PARTICLE_IDE) such that I would rewrite this as
#if defined(PARTICLE_IDE)
#include "PietteTech_DHT/PietteTech_DHT.h" // Building in IDE
#else
#include "PietteTech_DHT.h" // Building using CLI
#endif
Is there anyway to detect if the code it being built in the IDE?