conditional include for opencv2/photo/photo.hpp c++ depending on OpenCV version <p>I would like to create a conditional Include, depending on the OpenCV version. Actually I'm compiling in 2 different platforms the same source code. I'm developing in Ubuntu 14 and I want to run My application in a Raspberry PI. The problem I have is with the:</p> <pre><code>#include "opencv2/photo/photo.hpp" </code></pre> <p>In the raspberry I have OpenCV 2.4.1 and In Ubuntu the 2.4.8. Every time I compile I have to change the includes in several files which is annoying, That Why I would like to make a conditional Include, but no Idea how to this specific one.</p> <p>I read <a href="http://stackoverflow.com/questions/12314508/conditional-include-in-c">this</a> and a <a href="http://stackoverflow.com/questions/8930360/c-conditional-include-file-runtime">second</a> but I think is not the same problem. I also compile with CMAKE just in case I can create a variable or something to create the conditional include.</p>