On Tue, Dec 23, 2008 at 11:10 AM, Michael Jackson <span dir="ltr">&lt;<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">n Dec 23, 2008, at 11:56 AM, Bill Hoffman wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Robert Dailey wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
For debug: C:\foo\bar-d<br>
For release: C:\foo\bar<br>
Note that the text &quot;Debug&quot; or &quot;Release&quot; is not used in the include path, so simply using CFG_INTDIR would not work I don&#39;t think (Unless I&#39;m missing something again). This is why in CMake I need to do something like this:<br>

if( debug )<br>
 &nbsp; include_directories( C:\foo\bar-d )<br>
else()<br>
 &nbsp; include_directories( C:\foo\bar )<br>
endif()<br>
Thanks again to everyone for their continued help.<br>
</blockquote>
<br>
OK, well, since VS supports multiple configurations at VS time, and not CMake time, it is impossible to have the above if statement. &nbsp; There is just no way to know what configuration the user will pick. &nbsp; The user gets to pick a long time after that if statement was executed by CMake. &nbsp;So, I think you are sort of out of luck right now... &nbsp; What CMake needs is per configuration include_directories for this to work. &nbsp; One thing that might work as a work around, is that you could copy the header file via a custom command into your build tree, and then use the CFG_INTDIR approach.</div>
</div></blockquote>

<br>
I am just thinking out loud here so if I am totally off the mark just ignore.<br>
<br>
So the problem is including /foo/bar-d or /foo/bar for debug and release.<br>
<br>
For a release build there is the -NDEBUG definition and for Debug there is the -DEBUG compiler definitions defined (or something that at effect)<br>
<br>
In your own project have a header file (MySetup.h) with something like:<br>
<br>
#ifdef NDEBUG<br>
&nbsp;#include &quot;bar/setup.h&quot;<br>
#else<br>
&nbsp;#include &quot;bar-d/setup.h&quot;<br>
#endif<br>
<br>
Then you need to just have C:\foo on the include path.<br>
<br>
I _think_ something like that might work. Not sure how scalable or maintainable that might be since I have never used wxWidgets.</blockquote></div><br>This is a great idea but I can&#39;t do this, since I would have to edit wxWidgets source files to make this work. For my own specific case I do not want to edit third party libraries. However, again, this is a very valid work around and would be usable in the typical case.<br>